Exemple #1
0
 /**
  * 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;
 }