예제 #1
0
파일: Address.php 프로젝트: nja78/magento2
 /**
  * Convert object to array
  *
  * @param   array $arrAttributes
  * @return  array
  */
 public function toArray(array $arrAttributes = [])
 {
     $arr = parent::toArray($arrAttributes);
     $arr['rates'] = $this->getShippingRatesCollection()->toArray($arrAttributes);
     $arr['items'] = $this->getItemsCollection()->toArray($arrAttributes);
     foreach ($this->getTotals() as $k => $total) {
         $arr['totals'][$k] = $total->toArray();
     }
     return $arr;
 }