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


PHP Mage_Adminhtml_Block_Widget_Grid_Column::getId方法代碼示例

本文整理匯總了PHP中Mage_Adminhtml_Block_Widget_Grid_Column::getId方法的典型用法代碼示例。如果您正苦於以下問題:PHP Mage_Adminhtml_Block_Widget_Grid_Column::getId方法的具體用法?PHP Mage_Adminhtml_Block_Widget_Grid_Column::getId怎麽用?PHP Mage_Adminhtml_Block_Widget_Grid_Column::getId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Mage_Adminhtml_Block_Widget_Grid_Column的用法示例。


在下文中一共展示了Mage_Adminhtml_Block_Widget_Grid_Column::getId方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _addColumnFilterToCollection

 /**
  * Filter number of customers column
  *
  * @param Mage_Adminhtml_Block_Widget_Grid_Column $column
  * @return Enterprise_CustomerSegment_Block_Adminhtml_Report_Customer_Segment_Grid
  */
 protected function _addColumnFilterToCollection($column)
 {
     if ($column->getId() == 'customer_count') {
         if ($column->getFilter()->getValue() !== null) {
             $this->getCollection()->addCustomerCountFilter($column->getFilter()->getValue());
         }
     } else {
         parent::_addColumnFilterToCollection($column);
     }
     return $this;
 }
開發者ID:jpbender,項目名稱:mage_virtual,代碼行數:17,代碼來源:Grid.php

示例2: _addColumnFilterToCollection

 /**
  * Add custom column filter to collection
  *
  * @param Mage_Adminhtml_Block_Widget_Grid_Column $column
  * @return Mage_Api2_Block_Adminhtml_Permissions_User_Edit_Tab_Roles
  */
 protected function _addColumnFilterToCollection($column)
 {
     if ($column->getId() == 'assigned_user_role') {
         $userRoles = $this->_getSelectedRoles();
         if ($column->getFilter()->getValue()) {
             $this->getCollection()->addFieldToFilter('entity_id', array('in' => $userRoles));
         } elseif (!empty($userRoles)) {
             $this->getCollection()->addFieldToFilter('entity_id', array('nin' => $userRoles));
         } else {
             $this->getCollection();
         }
     } else {
         parent::_addColumnFilterToCollection($column);
     }
     return $this;
 }
開發者ID:QiuLihua83,項目名稱:magento-enterprise-1.13.1.0,代碼行數:22,代碼來源:Roles.php

示例3: _addColumnFilterToCollection

 /**
  * Add filter
  *
  * @param Mage_Adminhtml_Block_Widget_Grid_Column $column
  * @return Mage_Adminhtml_Block_Widget_Grid
  */
 protected function _addColumnFilterToCollection($column)
 {
     if ($this->getCollection()) {
         switch ($column->getId()) {
             case 'tax_rates':
                 $this->getCollection()->joinCalculationData('rate');
                 break;
             case 'customer_tax_classes':
                 $this->getCollection()->joinCalculationData('ctc');
                 break;
             case 'product_tax_classes':
                 $this->getCollection()->joinCalculationData('ptc');
                 break;
         }
     }
     return parent::_addColumnFilterToCollection($column);
 }
開發者ID:hyhoocchan,項目名稱:mage-local,代碼行數:23,代碼來源:Grid.php

示例4: _addColumnFilterToCollection

 /**
  * Filter checked/unchecked rows in grid
  *
  * @param Mage_Adminhtml_Block_Widget_Grid_Column $column
  * @return Mage_Adminhtml_Block_Catalog_Product_Widget_Chooser
  */
 protected function _addColumnFilterToCollection($column)
 {
     if ($column->getId() == 'in_products') {
         $selected = $this->getSelectedProducts();
         if ($column->getFilter()->getValue()) {
             $this->getCollection()->addFieldToFilter('entity_id', array('in' => $selected));
         } else {
             $this->getCollection()->addFieldToFilter('entity_id', array('nin' => $selected));
         }
     } else {
         parent::_addColumnFilterToCollection($column);
     }
     return $this;
 }
開發者ID:hazaeluz,項目名稱:magento_connect,代碼行數:20,代碼來源:Chooser.php

示例5: _addColumnFilterToCollection

 /**
  * Setting column filters to collection
  *
  * @param Mage_Adminhtml_Block_Widget_Grid_Column $column
  * @return Enterprise_Rma_Block_Adminhtml_Rma_New_Tab_Items_Order_Grid
  */
 protected function _addColumnFilterToCollection($column)
 {
     // Set custom filter for selected products flag
     if ($column->getId() == 'select') {
         $productIds = $this->_getSelectedProducts();
         if (empty($productIds)) {
             $productIds = 0;
         }
         if ($column->getFilter()->getValue()) {
             $this->getCollection()->addFieldToFilter('item_id', array('in' => $productIds));
         } else {
             if ($productIds) {
                 $this->getCollection()->addFieldToFilter('item_id', array('nin' => $productIds));
             }
         }
     } else {
         parent::_addColumnFilterToCollection($column);
     }
     return $this;
 }
開發者ID:QiuLihua83,項目名稱:magento-enterprise-1.13.1.0,代碼行數:26,代碼來源:Grid.php

示例6: _addColumnFilterToCollection

 /**
  * @param Mage_Adminhtml_Block_Widget_Grid_Column $column
  * @return Mage_Api2_Block_Adminhtml_Roles_Tab_Users
  */
 protected function _addColumnFilterToCollection($column)
 {
     if ($column->getId() == 'filter_in_role_users') {
         $inRoleIds = $this->getUsers();
         if (empty($inRoleIds)) {
             $inRoleIds = 0;
         }
         if ($column->getFilter()->getValue()) {
             $this->getCollection()->addFieldToFilter('user_id', array('in' => $inRoleIds));
         } else {
             if ($inRoleIds) {
                 $this->getCollection()->addFieldToFilter('user_id', array('nin' => $inRoleIds));
             }
         }
     } else {
         parent::_addColumnFilterToCollection($column);
     }
     return $this;
 }
開發者ID:par-orillonsoft,項目名稱:Magento,代碼行數:23,代碼來源:Users.php

示例7: _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

示例8: _addColumnFilterToCollection

 /**
  * Add column filter to collection
  *
  * @param Mage_Adminhtml_Block_Widget_Grid_Column $column
  * @return Mage_Adminhtml_Block_Customer_Edit_Tab_Wishlist
  */
 protected function _addColumnFilterToCollection($column)
 {
     if ($column->getId() == 'store') {
         $this->getCollection()->addFieldToFilter('item_store_id', $column->getFilter()->getCondition());
         return $this;
     }
     if ($this->getCollection() && $column->getFilter()->getValue()) {
         $this->getCollection()->addFieldToFilter($column->getIndex(), $column->getFilter()->getCondition());
     }
     return $this;
 }
開發者ID:hunnybohara,項目名稱:magento-chinese-localization,代碼行數:17,代碼來源:Wishlist.php

示例9: _addColumnFromBlock

 /**
  * Add a grid column from block origin
  * 
  * @param Mage_Adminhtml_Block_Widget_Grid_Column $column Column object
  * @param int $order Column order
  * @return this
  */
 protected function _addColumnFromBlock(Mage_Adminhtml_Block_Widget_Grid_Column $column, $order)
 {
     $this->addColumn($column->getId(), array('id' => $column->getId(), 'index' => $column->getIndex(), 'width' => $column->getWidth(), 'align' => array_key_exists($column->getAlign(), $this->getColumnAlignments()) ? $column->getAlign() : self::GRID_COLUMN_ALIGNMENT_LEFT, 'header' => $column->getHeader(), 'order' => $order, 'origin' => self::GRID_COLUMN_ORIGIN_GRID, 'is_visible' => 1, 'filter_only' => 0, 'is_system' => $column->getIsSystem() ? 1 : 0, 'missing' => 0, 'store_id' => null, 'renderer_type' => null, 'renderer_params' => null, 'allow_edit' => 1, 'custom_params' => null));
     return $this;
 }
開發者ID:xiaoguizhidao,項目名稱:blingjewelry-prod,代碼行數:12,代碼來源:Grid.php


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