本文整理汇总了PHP中Mage_Catalog_Model_Resource_Product_Collection::_afterLoad方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Catalog_Model_Resource_Product_Collection::_afterLoad方法的具体用法?PHP Mage_Catalog_Model_Resource_Product_Collection::_afterLoad怎么用?PHP Mage_Catalog_Model_Resource_Product_Collection::_afterLoad使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Catalog_Model_Resource_Product_Collection
的用法示例。
在下文中一共展示了Mage_Catalog_Model_Resource_Product_Collection::_afterLoad方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _afterLoad
/**
* Processing collection items after loading
* Raise additional event
*
* @return Mage_Catalog_Model_Resource_Product_Collection
*/
protected function _afterLoad()
{
parent::_afterLoad();
if (count($this) > 0) {
Mage::dispatchEvent('mongo_catalog_product_collection_load_after', array('collection' => $this));
}
return $this;
}
示例2: _afterLoad
/**
* Set store id for each collection item when collection was loaded
*
* @return void
*/
public function _afterLoad()
{
parent::_afterLoad();
if ($this->getStoreId() && $this->_items) {
foreach ($this->_items as $item) {
$item->setStoreId($this->getStoreId());
}
}
return $this;
}
示例3: _afterLoad
/**
* Action after load
*
* @return Mage_Review_Model_Resource_Review_Product_Collection
*/
protected function _afterLoad()
{
parent::_afterLoad();
if ($this->_addStoreDataFlag) {
$this->_addStoreData();
}
return $this;
}
示例4: _afterLoad
/**
* Reorder collection according to current sort order.
*
* @return Smile_ElasticSearch_Model_Resource_Catalog_Product_Collection
*/
protected function _afterLoad()
{
parent::_afterLoad();
if (!empty($this->_searchedEntityIds)) {
$sortedItems = array();
foreach ($this->_searchedEntityIds as $id) {
if (isset($this->_items[$id])) {
$sortedItems[$id] = $this->_items[$id];
}
}
$this->_items =& $sortedItems;
}
return $this;
}
示例5: _afterLoad
/**
* After load adding data
*
* @return Mage_Tag_Model_Resource_Product_Collection
*/
protected function _afterLoad()
{
parent::_afterLoad();
if ($this->getFlag('add_stores_after')) {
$this->_addStoresVisibility();
}
if (count($this) > 0) {
Mage::dispatchEvent('tag_tag_product_collection_load_after', array('collection' => $this));
}
return $this;
}
示例6: _afterLoad
/**
* Sort items
*
* @return Mage_Catalog_Model_Resource_Product_Collection
*/
protected function _afterLoad()
{
$result = parent::_afterLoad();
$this->_sort();
return $result;
}
示例7: _afterLoad
/**
* Sort collection items by sort order of found ids
*
* @return Enterprise_Search_Model_Resource_Collection
*/
protected function _afterLoad()
{
parent::_afterLoad();
$sortedItems = array();
foreach ($this->_searchedEntityIds as $id) {
if (isset($this->_items[$id])) {
$sortedItems[$id] = $this->_items[$id];
}
}
$this->_items =& $sortedItems;
/**
* Revert page size for proper paginator ranges
*/
$this->_pageSize = $this->_storedPageSize;
return $this;
}
示例8: _afterLoad
/**
* Sort collection items by sort order of found ids
*
* @return Enterprise_Search_Model_Resource_Collection
*/
protected function _afterLoad()
{
parent::_afterLoad();
$this->_items = $this->_sortResultItems();
/**
* Revert page size for proper paginator ranges
*/
$this->_pageSize = $this->_storedPageSize;
return $this;
}