本文整理汇总了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);
}
示例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);
}
示例3: toOptionArray
/**
* Retreive option array
*
* @return array
*/
public function toOptionArray()
{
return parent::_toOptionArray('customer_group_id', 'customer_group_code');
}
示例4: toOptionArray
/**
* Retrieve option array
*
* @return array
*/
public function toOptionArray()
{
return parent::_toOptionArray('group_id', 'group_name');
}
示例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');
}
示例6: toOptionArray
/**
* Convert items array to array for select options
*
* @return array
*/
public function toOptionArray()
{
return parent::_toOptionArray('status_id', 'status_code');
}
示例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);
}
示例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);
}
示例9: _toOptionArray
protected function _toOptionArray($valueField = 'contact_id', $labelField = 'none', $additional = array())
{
return parent::_toOptionArray($valueField, $labelField, $additional);
}
示例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);
}
示例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);
}
示例13: toOptionArray
/**
* Convert collection items to select options array
*
* @return array
*/
public function toOptionArray()
{
return parent::_toOptionArray('attribute_set_id', 'attribute_set_name');
}
示例14: toOptionArray
/**
* Return option array
*
* @return array
*/
public function toOptionArray()
{
return parent::_toOptionArray('event_type_id', 'event_name');
}