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


PHP Varien_Data_Collection::getItemByColumnValue方法代码示例

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


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

示例1: _applyEventToCategory

 /**
  * Apply event to category
  *
  * @param Varien_Data_Tree_Node|Mage_Catalog_Model_Category $category
  * @param Varien_Data_Collection $eventCollection
  * @return Enterprise_CatalogEvent_Model_Observer
  */
 protected function _applyEventToCategory($category, Varien_Data_Collection $eventCollection)
 {
     foreach (array_reverse($this->_parseCategoryPath($category->getPath())) as $categoryId) {
         // Walk through category path, search event for category
         $event = $eventCollection->getItemByColumnValue('category_id', $categoryId);
         if ($event) {
             $category->setEvent($event);
             return $this;
         }
     }
     return $this;
 }
开发者ID:barneydesmond,项目名称:propitious-octo-tribble,代码行数:19,代码来源:Observer.php

示例2: _verifyTrack

 /**
  * Verify that the passed in track number is in the collections of Magento shipment tracks, otherwise logs warning message.
  * @param  Varien_Data_Collection $tracks
  * @param  OrderEvents\ITrackingNumber $trackingNumber
  * @return self
  */
 protected function _verifyTrack(Varien_Data_Collection $tracks, OrderEvents\ITrackingNumber $trackingNumber)
 {
     $number = $trackingNumber->getTrackingNumber();
     $track = $tracks->getItemByColumnValue('track_number', $number);
     if (is_null($track)) {
         $logMessage = "Magento did not add an expected-to-be-shipped Track number ({$number}) to the shipment.";
         $this->_logger->warning($logMessage, $this->_context->getMetaData(__CLASS__));
     }
     return $this;
 }
开发者ID:sirishreddyg,项目名称:magento-retail-order-management,代码行数:16,代码来源:Shipment.php

示例3: _appendToQtyArray

 /**
  * Append a new quantity index to the passed in 'qtys' array when a match Magento
  * order item is found in the pass in items collection.
  * @param  OrderEvents\IOrderItem $orderItem
  * @param  Varien_Data_Collection $items
  * @param  array $qtys
  * @return self
  */
 protected function _appendToQtyArray(OrderEvents\IOrderItem $orderItem, Varien_Data_Collection $items, array $qtys)
 {
     $item = $items->getItemByColumnValue('sku', $orderItem->getItemId());
     if ($item) {
         // Magento only support integer quantity
         $qtys[$item->getItemId()] = (int) $orderItem->getQuantity();
     }
     return $qtys;
 }
开发者ID:sirishreddyg,项目名称:magento-retail-order-management,代码行数:17,代码来源:Creditissued.php


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