traits/models/SetPropertyAttributeTrait.php
protected function setPropertyAttribute($arValue)
    {
        if (is_string($arValue)) {
            $arValue = $this->fromJson($arValue);
        }

        if (empty($arValue) || !is_array($arValue)) {
            return;
        }

        $arPropertyList = $this->property;
        if (empty($arPropertyList)) {
            $arPropertyList = [];
        }

        foreach ($arValue as $sKey => $sValue) {
            $arPropertyList[$sKey] = $sValue;
        }

        $this->attributes['property'] = $this->asJson($arPropertyList);
    }
protected function setPropertyAttribute($arValue)
    {
        if (is_string($arValue)) {
            $arValue = $this->fromJson($arValue);
        }

        if (empty($arValue) || !is_array($arValue)) {
            return;
        }

        $arPropertyList = $this->property;
        if (empty($arPropertyList)) {
            $arPropertyList = [];
        }

        foreach ($arValue as $sKey => $sValue) {
            $arPropertyList[$sKey] = $sValue;
        }

        $this->attributes['property'] = $this->asJson($arPropertyList);
    }
protected function setPropertyAttribute ( $ arValue ) { if ( is_string ( $ arValue ) ) { $ arValue = $ this -> fromJson ( $ arValue ) ; } if ( empty ( $ arValue ) || ! is_array ( $ arValue ) ) { return ; } $ arPropertyList = $ this -> property ; if ( empty ( $ arPropertyList ) ) { $ arPropertyList = [ ] ; } foreach ( $ arValue as $ sKey => $ sValue ) { $ arPropertyList [ $ sKey ] = $ sValue ; } $ this -> attributes [ 'property' ] = $ this -> asJson ( $ arPropertyList ) ; }
Set property attribute, nerge new values with old values
@param array $arValue
Set property attribute nerge new values with old values