本文整理匯總了PHP中Mage_Adminhtml_Block_Widget_Grid_Column::getDir方法的典型用法代碼示例。如果您正苦於以下問題:PHP Mage_Adminhtml_Block_Widget_Grid_Column::getDir方法的具體用法?PHP Mage_Adminhtml_Block_Widget_Grid_Column::getDir怎麽用?PHP Mage_Adminhtml_Block_Widget_Grid_Column::getDir使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Mage_Adminhtml_Block_Widget_Grid_Column
的用法示例。
在下文中一共展示了Mage_Adminhtml_Block_Widget_Grid_Column::getDir方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _setCollectionOrder
/**
* Sets sorting order by some column
*
* @param Mage_Adminhtml_Block_Widget_Grid_Column $column
* @return Mage_Adminhtml_Block_Widget_Grid
*/
protected function _setCollectionOrder($column)
{
$collection = $this->getCollection();
if ($collection) {
$columnIndex = $column->getFilterIndex() ? $column->getFilterIndex() : $column->getIndex();
$columnIndex = $columnIndex == 'category_ids' ? 'cat_ids' : $columnIndex;
$collection->setOrder($columnIndex, strtoupper($column->getDir()));
}
return $this;
}
開發者ID:vinayshuklasourcefuse,項目名稱:sareez,代碼行數:16,代碼來源:Ezmage_Iksanika_Productupdater_Block_Catalog_Product_Grid.php
示例2: _setCollectionOrder
/**
* Sets sorting order by some column
*
* @param Mage_Adminhtml_Block_Widget_Grid_Column $column
* @return Mage_Adminhtml_Block_Customer_Edit_Tab_Wishlist
*/
protected function _setCollectionOrder($column)
{
$collection = $this->getCollection();
if ($collection) {
switch ($column->getId()) {
case 'product_name':
$collection->setOrderByProductName($column->getDir());
break;
default:
parent::_setCollectionOrder($column);
break;
}
}
return $this;
}
示例3: _setCollectionOrder
/**
* Sets sorting order by some column
*
* @param Mage_Adminhtml_Block_Widget_Grid_Column $column
*
* @return $this
*/
protected function _setCollectionOrder($column)
{
$collection = $this->getCollection();
if (!$collection) {
return $this;
}
$columnIndex = $column->getFilterIndex() ? $column->getFilterIndex() : $column->getIndex();
$collection->setOrder($columnIndex, strtoupper($column->getDir()));
return $this;
}