예제 #1
0
 /**
  * @return Collection
  */
 public function getAddressesCollection()
 {
     $collection = $this->_addressCollectionFactory->create()->setOrderFilter($this);
     if ($this->getId()) {
         foreach ($collection as $address) {
             $address->setOrder($this);
         }
     }
     return $collection;
 }
예제 #2
0
 /**
  * @return Collection
  */
 public function getAddressesCollection()
 {
     if (is_null($this->_addresses)) {
         $this->_addresses = $this->_addressCollectionFactory->create()->setOrderFilter($this);
         if ($this->getId()) {
             foreach ($this->_addresses as $address) {
                 $address->setOrder($this);
             }
         }
     }
     return $this->_addresses;
 }