当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Adminhtml_Block_Widget_Grid::_afterLoadCollection方法代码示例

本文整理汇总了PHP中Mage_Adminhtml_Block_Widget_Grid::_afterLoadCollection方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Adminhtml_Block_Widget_Grid::_afterLoadCollection方法的具体用法?PHP Mage_Adminhtml_Block_Widget_Grid::_afterLoadCollection怎么用?PHP Mage_Adminhtml_Block_Widget_Grid::_afterLoadCollection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Adminhtml_Block_Widget_Grid的用法示例。


在下文中一共展示了Mage_Adminhtml_Block_Widget_Grid::_afterLoadCollection方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _afterLoadCollection

 /**
  * @return Xcom_Mapping_Block_Adminhtml_Attribute_Set_Grid
  */
 protected function _afterLoadCollection()
 {
     /** @var $validator Xcom_Mapping_Model_Validator */
     $validator = Mage::getSingleton('xcom_mapping/validator');
     foreach ($this->getCollection() as $item) {
         $id = $item->getMappingProductTypeId();
         $attributeSetId = $item->getAttributeSetId();
         if (!$validator->validateIsRequiredAttributeHasMappedValue($id, null, $attributeSetId)) {
             $item->setProductTypeName($item->getProductTypeName() . ' (' . $this->__('Incomplete') . ')');
         }
     }
     return parent::_afterLoadCollection();
 }
开发者ID:ridhoq,项目名称:mxpi-twitter,代码行数:16,代码来源:Grid.php

示例2: _afterLoadCollection

 /**
  * After load collection processing
  *
  * @return Enterprise_Reward_Block_Adminhtml_Customer_Edit_Tab_Reward_Management_Balance_Grid
  */
 protected function _afterLoadCollection()
 {
     parent::_afterLoadCollection();
     /* @var $item Enterprise_Reward_Model_Reward */
     foreach ($this->getCollection() as $item) {
         $website = $item->getData('website_id');
         if ($website !== null) {
             $minBalance = Mage::helper('enterprise_reward')->getGeneralConfig('min_points_balance', (int) $website);
             $maxBalance = Mage::helper('enterprise_reward')->getGeneralConfig('max_points_balance', (int) $website);
             $item->addData(array('min_points_balance' => (int) $minBalance, 'max_points_balance' => !(int) $maxBalance ? Mage::helper('adminhtml')->__('Unlimited') : $maxBalance));
         } else {
             $this->_customerHasOrphanPoints = true;
             $item->addData(array('min_points_balance' => Mage::helper('adminhtml')->__('No Data'), 'max_points_balance' => Mage::helper('adminhtml')->__('No Data')));
         }
         $item->setCustomer($this->getCustomer());
     }
     return $this;
 }
开发者ID:barneydesmond,项目名称:propitious-octo-tribble,代码行数:23,代码来源:Grid.php

示例3: _afterLoadCollection

 /**
  * after collection load
  * @access protected
  * @return Ultimate_ordersBatches_Block_Adminhtml_Batche_Grid
  * @author Ultimate Module Creator
  */
 protected function _afterLoadCollection()
 {
     $this->getCollection()->walk('afterLoad');
     parent::_afterLoadCollection();
 }
开发者ID:monarcmoso,项目名称:beta2,代码行数:11,代码来源:Grid.php

示例4: _afterLoadCollection

 protected function _afterLoadCollection()
 {
     return parent::_afterLoadCollection();
 }
开发者ID:hyhoocchan,项目名称:mage-local,代码行数:4,代码来源:Grid.php

示例5: _afterLoadCollection

 /**
  * Checking the data contains the same value of data after collection
  *
  * @return Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Grid
  */
 protected function _afterLoadCollection()
 {
     parent::_afterLoadCollection();
     $attributeCodes = $this->_getConfigAttributeCodes();
     if (!$attributeCodes) {
         return $this;
     }
     $disableMultiSelect = false;
     $ids = array();
     foreach ($this->_collection as $item) {
         $ids[] = $item->getId();
         $needleAttributeValues = $this->_retrieveRowData($item);
         foreach ($this->_collection as $item2) {
             // Skip the data if already checked
             if (in_array($item2->getId(), $ids)) {
                 continue;
             }
             $attributeValues = $this->_retrieveRowData($item2);
             $disableMultiSelect = $needleAttributeValues == $attributeValues;
             if ($disableMultiSelect) {
                 break;
             }
         }
         if ($disableMultiSelect) {
             break;
         }
     }
     // Disable multiselect column
     if ($disableMultiSelect) {
         $selectAll = $this->getColumn('in_products');
         if ($selectAll) {
             $selectAll->setDisabled(true);
         }
     }
     return $this;
 }
开发者ID:SalesOneGit,项目名称:s1_magento,代码行数:41,代码来源:Grid.php

示例6: _afterLoadCollection

 protected function _afterLoadCollection()
 {
     $this->itemsCollection = Mage::helper('M2ePro/Component_Buy')->getCollection('Order_Item')->addFieldToFilter('order_id', array('in' => $this->getCollection()->getColumnValues('id')));
     return parent::_afterLoadCollection();
 }
开发者ID:newedge-media,项目名称:iwantmymeds,代码行数:5,代码来源:Grid.php

示例7: _afterLoadCollection

 protected function _afterLoadCollection()
 {
     $this->getCollection()->addOptionsToResult();
     return parent::_afterLoadCollection();
 }
开发者ID:blazeriaz,项目名称:youguess,代码行数:5,代码来源:Grid.php

示例8: _afterLoadCollection

 protected function _afterLoadCollection()
 {
     $oCollection = $this->getCollection();
     $aIdHash = array();
     $aRuleCustomerHash = array();
     foreach ($oCollection->load() as $oCustomer) {
         if ($oCustomer->getId()) {
             $aIdHash[] = $oCustomer->getId();
         }
     }
     if ($aIdHash) {
         $aCustomerHash = $this->getCustomerHash();
         $oResource = Mage::getSingleton('core/resource');
         $sTable = $oResource->getTableName('aitoc_salesrule_assign_cutomer');
         $oDb = Mage::getSingleton('core/resource')->getConnection('core_write');
         $oSelect = $oDb->select()->from($sTable, array('entity_id', 'customer_id'))->where('entity_id IN (' . implode(',', $aIdHash) . ')');
         $aCustomerValues = $oDb->fetchAll($oSelect);
         if ($aCustomerValues) {
             foreach ($aCustomerValues as $aData) {
                 if (isset($aCustomerHash[$aData['customer_id']])) {
                     $aRuleCustomerHash[$aData['entity_id']][$aData['customer_id']] = $aCustomerHash[$aData['customer_id']];
                 }
             }
         }
     }
     Mage::register('aitindividpromo_data', $aRuleCustomerHash);
     return parent::_afterLoadCollection();
 }
开发者ID:sagmahajan,项目名称:aswan_release,代码行数:28,代码来源:AdminhtmlPromoQuoteGrid.php

示例9: _afterLoadCollection

 /**
  * Allow provider and filters to alter the grid
  * 
  */
 protected function _afterLoadCollection()
 {
     parent::_afterLoadCollection();
     $this->getFilter()->afterGridLoadCollection($this);
     return $this;
 }
开发者ID:jsiefer,项目名称:emarketing,代码行数:10,代码来源:Grid.php

示例10: _afterLoadCollection

 protected function _afterLoadCollection()
 {
     $this->removeColumn('draft_po_product_id');
     parent::_afterLoadCollection();
     $this->helper('inventorysupplyneeds')->addWarehouseStaticToCollection($this->getCollection());
     return $this;
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:7,代码来源:Grid.php

示例11: _afterLoadCollection

 /**
  * after collection load
  * @access protected
  * @return Easylife_MageOverflow_Block_Adminhtml_Overflowuser_Grid
  * @author Marius Strajeru
  */
 protected function _afterLoadCollection()
 {
     parent::_afterLoadCollection();
     $basePath = Mage::getStoreConfig('easylife_mageoverflow/overflowuser/base_feed_link');
     $limit = Mage::getStoreConfig('easylife_mageoverflow/overflowuser/awake');
     foreach ($this->getCollection() as $item) {
         try {
             $feed = Zend_Feed_Reader::import('http://magento.stackexchange.com/feeds/user/' . $item->getUserid());
             //            echo "<pre>"; print_r($feed->entry);exit;
             $now = new DateTime();
             $lastSeen = false;
             $author = false;
             foreach ($feed as $entry) {
                 $author = $entry->getAuthor();
                 $lastDate = new DateTime();
                 $lastDate->setTimestamp($entry->getDateModified()->getTimestamp());
                 $lastSeen = $now->diff($lastDate);
                 break;
             }
             if ($author && is_array($author) && isset($author['name'])) {
                 $author = $author['name'];
             } else {
                 $author = '--';
             }
             $item->setName($author);
             if ($lastSeen) {
                 $output = $this->__('%s days, %s hours, %s minutes and %s seconds', $lastSeen->d, $lastSeen->h, $lastSeen->i, $lastSeen->s);
                 $isSleeping = $lastSeen->d > 0 || $lastSeen->h >= $limit;
                 $asleep = $isSleeping ? $this->__('Is sleeping') : $this->__('Is awake');
                 $item->setLastSeen($output);
                 $item->setStatus($asleep);
             } else {
                 $item->setLastSeen($this->__('Was never seen'));
                 $item->setStatus($this->__('Does not exist'));
             }
         } catch (Exception $e) {
             $item->setLastSeen('--');
             $item->setStatus('--');
             $item->setName('--');
         }
     }
 }
开发者ID:beejhuff,项目名称:WhoIsOnMageOverflow,代码行数:48,代码来源:Grid.php


注:本文中的Mage_Adminhtml_Block_Widget_Grid::_afterLoadCollection方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。