當前位置: 首頁>>代碼示例>>PHP>>正文


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怎麽用?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;
 }
開發者ID:cewolf2002,項目名稱:magento,代碼行數:21,代碼來源:Wishlist.php

示例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;
 }
開發者ID:myparcelnl,項目名稱:magento1,代碼行數:17,代碼來源:ShipmentGrid.php


注:本文中的Mage_Adminhtml_Block_Widget_Grid_Column::getDir方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。