コード例 #1
0
ファイル: Collection.php プロジェクト: aiesh/magento2
 /**
  * Set store id for each collection item when collection was loaded
  *
  * @return $this
  */
 public function _afterLoad()
 {
     parent::_afterLoad();
     if ($this->getStoreId() && $this->_items) {
         foreach ($this->_items as $item) {
             $item->setStoreId($this->getStoreId());
         }
     }
     return $this;
 }
コード例 #2
0
ファイル: Collection.php プロジェクト: zhangjiachao/magento2
 /**
  * Action after load
  *
  * @return $this
  */
 protected function _afterLoad()
 {
     parent::_afterLoad();
     if ($this->_addStoreDataFlag) {
         $this->_addStoreData();
     }
     return $this;
 }