本文整理汇总了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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}