当前位置: 首页>>代码示例>>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;未经允许,请勿转载。