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


PHP Mage_Core_Model_Resource_Db_Collection_Abstract::_toOptionArray方法代码示例

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


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

示例1: _toOptionArray

 /**
  * Get triggers as array
  *
  * @param string $valueField
  * @param string $labelField
  * @param array $additional
  * @return array
  */
 protected function _toOptionArray($valueField = 'entity_id', $labelField = 'name', $additional = [])
 {
     $data = parent::_toOptionArray($valueField, $labelField, array('order' => 'order'));
     usort($data, function ($a, $b) {
         return $a['order'] - $b['order'];
     });
     return array_map(function (array $row) {
         unset($row['order']);
         return $row;
     }, $data);
 }
开发者ID:WeareJH,项目名称:esendex-magento-extension,代码行数:19,代码来源:Collection.php

示例2: _toOptionArray

 /**
  * get anymarket products as array
  *
  * @access protected
  * @param string $valueField
  * @param string $labelField
  * @param array $additional
  * @return array
  * 
  */
 protected function _toOptionArray($valueField = 'entity_id', $labelField = 'nmp_status_int', $additional = array())
 {
     return parent::_toOptionArray($valueField, $labelField, $additional);
 }
开发者ID:novapc,项目名称:magento,代码行数:14,代码来源:Collection.php

示例3: toOptionArray

 /**
  * Retreive option array
  *
  * @return array
  */
 public function toOptionArray()
 {
     return parent::_toOptionArray('customer_group_id', 'customer_group_code');
 }
开发者ID:hyhoocchan,项目名称:mage-local,代码行数:9,代码来源:Collection.php

示例4: toOptionArray

 /**
  * Retrieve option array
  *
  * @return array
  */
 public function toOptionArray()
 {
     return parent::_toOptionArray('group_id', 'group_name');
 }
开发者ID:atsareva,项目名称:Reminder,代码行数:9,代码来源:Collection.php

示例5: toOptionArray

 /**
  * Convert items array to array for select options
  * array(
  *      $index => array(
  *          'value' => mixed
  *          'label' => mixed
  *      )
  * )
  *
  * @return array
  */
 public function toOptionArray()
 {
     return parent::_toOptionArray('staging_item_id', 'name');
 }
开发者ID:QiuLihua83,项目名称:magento-enterprise-1.13.1.0,代码行数:15,代码来源:Collection.php

示例6: toOptionArray

 /**
  * Convert items array to array for select options
  *
  * @return array
  */
 public function toOptionArray()
 {
     return parent::_toOptionArray('status_id', 'status_code');
 }
开发者ID:hirentricore,项目名称:devmagento,代码行数:9,代码来源:Collection.php

示例7: _toOptionArray

 /**
  * get batches as array
  * @access protected
  * @param string $valueField
  * @param string $labelField
  * @param array $additional
  * @return array
  * @author Ultimate Module Creator
  */
 protected function _toOptionArray($valueField = 'entity_id', $labelField = 'batches_name_input', $additional = array())
 {
     return parent::_toOptionArray($valueField, $labelField, $additional);
 }
开发者ID:monarcmoso,项目名称:beta2,代码行数:13,代码来源:Collection.php

示例8: _toOptionArray

 /**
  * get warehouses as array
  * @access protected
  * @param string $valueField
  * @param string $labelField
  * @param array $additional
  * @return array
  * @author Ultimate Module Creator
  */
 protected function _toOptionArray($valueField = 'entity_id', $labelField = 'warehouse_name', $additional = array())
 {
     return parent::_toOptionArray($valueField, $labelField, $additional);
 }
开发者ID:xiaoguizhidao,项目名称:ecommerce,代码行数:13,代码来源:Collection.php

示例9: _toOptionArray

 protected function _toOptionArray($valueField = 'contact_id', $labelField = 'none', $additional = array())
 {
     return parent::_toOptionArray($valueField, $labelField, $additional);
 }
开发者ID:DanCarlyon,项目名称:SaveContactUsExtension,代码行数:4,代码来源:Collection.php

示例10: _toOptionArray

 /**
  * get searches as array
  *
  * @access protected
  * @param string $valueField
  * @param string $labelField
  * @param array $additional
  * @return array
  * @author Ultimate Module Creator
  */
 protected function _toOptionArray($valueField = 'id', $labelField = 'short_temple_search', $additional = array())
 {
     return parent::_toOptionArray($valueField, $labelField, $additional);
 }
开发者ID:sshegde123,项目名称:wmp8,代码行数:14,代码来源:Collection.php

示例11: _toOptionArray

 /**
  * get freeresources as array
  * @access protected
  * @param string $valueField
  * @param string $labelField
  * @param array $additional
  * @return array
  */
 protected function _toOptionArray($valueField = 'entity_id', $labelField = 'free_resource', $additional = array())
 {
     return parent::_toOptionArray($valueField, $labelField, $additional);
 }
开发者ID:ankita-parashar,项目名称:magento,代码行数:12,代码来源:ICC_Freeresources_Model_Resource_Freeresource_Collection.php

示例12: _toOptionArray

 /**
  * @inheritdoc
  */
 protected function _toOptionArray($valueField = null, $labelField = 'name', $additional = [])
 {
     if ($valueField === null) {
         $valueField = $this->getResource()->getIdFieldName();
         if ($valueField === null) {
             $valueField = 'id';
         }
     }
     return parent::_toOptionArray($valueField, $labelField, $additional);
 }
开发者ID:aoepeople,项目名称:aoe_fraudmanager,代码行数:13,代码来源:Abstract.php

示例13: toOptionArray

 /**
  * Convert collection items to select options array
  *
  * @return array
  */
 public function toOptionArray()
 {
     return parent::_toOptionArray('attribute_set_id', 'attribute_set_name');
 }
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:9,代码来源:Collection.php

示例14: toOptionArray

 /**
  * Return option array
  *
  * @return array
  */
 public function toOptionArray()
 {
     return parent::_toOptionArray('event_type_id', 'event_name');
 }
开发者ID:quyip8818,项目名称:Mag,代码行数:9,代码来源:Collection.php


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