/** * Unserialize additional_information in each item * * @return $this */ protected function _afterLoad() { foreach ($this->_items as $item) { $this->getResource()->unserializeFields($item); } return parent::_afterLoad(); }
/** * Assign parent items on after collection load * * @return $this */ protected function _afterLoad() { parent::_afterLoad(); /** * Assign parent items */ foreach ($this as $item) { if ($item->getParentItemId()) { $item->setParentItem($this->getItemById($item->getParentItemId())); } } return $this; }
/** * Assign parent items on after collection load * * @return $this */ protected function _afterLoad() { parent::_afterLoad(); /** * Assign parent items */ foreach ($this as $item) { $this->_resource->unserializeFields($item); if ($item->getParentItemId()) { $item->setParentItem($this->getItemById($item->getParentItemId())); } } return $this; }
/** * Redeclare after load method for dispatch event * * @return $this */ protected function _afterLoad() { parent::_afterLoad(); $this->_eventManager->dispatch($this->_eventPrefix . '_load_after', [$this->_eventObject => $this]); return $this; }