protected function setPriceListAttribute($arPriceList)
    {
        if (empty($arPriceList) || !is_array($arPriceList)) {
            return;
        }

        if (isset($arPriceList[0])) {
            $this->fSavedPrice = array_get($arPriceList[0], 'price');
            $this->fSavedOldPrice = array_get($arPriceList[0], 'old_price');
            unset($arPriceList[0]);
        }

        $this->arSavedPriceList = $arPriceList;
    }
protected function setPriceListAttribute($arPriceList)
    {
        if (empty($arPriceList) || !is_array($arPriceList)) {
            return;
        }

        if (isset($arPriceList[0])) {
            $this->fSavedPrice = array_get($arPriceList[0], 'price');
            $this->fSavedOldPrice = array_get($arPriceList[0], 'old_price');
            unset($arPriceList[0]);
        }

        $this->arSavedPriceList = $arPriceList;
    }
protected function setPriceListAttribute ( $ arPriceList ) { if ( empty ( $ arPriceList ) || ! is_array ( $ arPriceList ) ) { return ; } if ( isset ( $ arPriceList [ 0 ] ) ) { $ this -> fSavedPrice = array_get ( $ arPriceList [ 0 ] , 'price' ) ; $ this -> fSavedOldPrice = array_get ( $ arPriceList [ 0 ] , 'old_price' ) ; unset ( $ arPriceList [ 0 ] ) ; } $ this -> arSavedPriceList = $ arPriceList ; }
Set price list attribute
Create or update Price model object
@param string|float $arPriceList
Set price list attribute Create or update Price model object