Public Member Functions | |
__construct () | |
getRowUrl ($row) | |
Protected Member Functions | |
_prepareCollection () | |
_prepareColumns () | |
_addColumnFilterToCollection ($column) |
Definition at line 34 of file All.php.
__construct | ( | ) |
Constructor
By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes
Reimplemented from Varien_Object.
Definition at line 36 of file All.php.
00037 { 00038 parent::__construct(); 00039 $this->setId('tagsGrid'); 00040 $this->setDefaultSort('tag_id', 'desc'); 00041 }
_addColumnFilterToCollection | ( | $ | column | ) | [protected] |
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 88 of file All.php.
00089 { 00090 if ($this->getCollection() && $column->getFilter()->getValue()) { 00091 if($column->getIndex()=='stores') { 00092 $this->getCollection()->addAttributeToFilter( $column->getIndex(), $column->getFilter()->getCondition()); 00093 } else { 00094 $this->getCollection()->addStoreFilter($column->getFilter()->getCondition()); 00095 } 00096 } 00097 return $this; 00098 }
_prepareCollection | ( | ) | [protected] |
Prepare grid collection object
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 43 of file All.php.
00044 { 00045 $collection = Mage::getResourceModel('tag/tag_collection') 00046 // ->addStoreFilter(Mage::app()->getStore()->getId()) 00047 ->addStoresVisibility() 00048 ; 00049 $this->setCollection($collection); 00050 return parent::_prepareCollection(); 00051 }
_prepareColumns | ( | ) | [protected] |
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 53 of file All.php.
00054 { 00055 $this->addColumn('name', array( 00056 'header' => Mage::helper('tag')->__('Tag'), 00057 'index' => 'name', 00058 )); 00059 $this->addColumn('total_used', array( 00060 'header' => Mage::helper('tag')->__('# of Uses'), 00061 'width' => '140px', 00062 'align' => 'center', 00063 'index' => 'total_used', 00064 'type' => 'number', 00065 )); 00066 $this->addColumn('status', array( 00067 'header' => Mage::helper('tag')->__('Status'), 00068 'width' => '90px', 00069 'index' => 'status', 00070 'type' => 'options', 00071 'options' => array( 00072 Mage_Tag_Model_Tag::STATUS_DISABLED => Mage::helper('tag')->__('Disabled'), 00073 Mage_Tag_Model_Tag::STATUS_PENDING => Mage::helper('tag')->__('Pending'), 00074 Mage_Tag_Model_Tag::STATUS_APPROVED => Mage::helper('tag')->__('Approved'), 00075 ), 00076 )); 00077 00078 00079 00080 $this->setColumnFilter('id') 00081 ->setColumnFilter('name') 00082 ->setColumnFilter('total_used') 00083 ; 00084 00085 return parent::_prepareColumns(); 00086 }
getRowUrl | ( | $ | row | ) |