Public Member Functions | |
__construct () | |
getGridUrl () | |
Protected Member Functions | |
_prepareCollection () | |
_afterLoadCollection () | |
_prepareColumns () | |
getRowUrl ($row) |
Definition at line 35 of file Tag.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 37 of file Tag.php.
00038 { 00039 parent::__construct(); 00040 $this->setId('tag_grid'); 00041 $this->setDefaultSort('name'); 00042 $this->setDefaultDir('ASC'); 00043 $this->setUseAjax(true); 00044 }
_afterLoadCollection | ( | ) | [protected] |
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 58 of file Tag.php.
00059 { 00060 return parent::_afterLoadCollection(); 00061 }
_prepareCollection | ( | ) | [protected] |
Prepare grid collection object
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 46 of file Tag.php.
00047 { 00048 $tagId = Mage::registry('tagId'); 00049 $collection = Mage::getModel('tag/tag') 00050 ->getResourceCollection() 00051 ->addProductFilter($this->getProductId()) 00052 ->addPopularity($tagId); 00053 00054 $this->setCollection($collection); 00055 return parent::_prepareCollection(); 00056 }
_prepareColumns | ( | ) | [protected] |
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 63 of file Tag.php.
00064 { 00065 $this->addColumn('name', array( 00066 'header' => Mage::helper('catalog')->__('Tag Name'), 00067 'index' => 'name', 00068 )); 00069 00070 $this->addColumn('popularity', array( 00071 'header' => Mage::helper('catalog')->__('# of Use'), 00072 'width' => '50px', 00073 'align' => 'right', 00074 'index' => 'popularity', 00075 'type' => 'number', 00076 )); 00077 00078 $this->addColumn('status', array( 00079 'header' => Mage::helper('catalog')->__('Status'), 00080 'width' => '90px', 00081 'index' => 'status', 00082 'type' => 'options', 00083 'options' => array( 00084 Mage_Tag_Model_Tag::STATUS_DISABLED => Mage::helper('catalog')->__('Disabled'), 00085 Mage_Tag_Model_Tag::STATUS_PENDING => Mage::helper('catalog')->__('Pending'), 00086 Mage_Tag_Model_Tag::STATUS_APPROVED => Mage::helper('catalog')->__('Approved'), 00087 ), 00088 )); 00089 00090 return parent::_prepareColumns(); 00091 }
getGridUrl | ( | ) |
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 101 of file Tag.php.
00102 { 00103 return $this->getUrl('*/catalog_product/tagGrid', array( 00104 '_current' => true, 00105 'id' => $this->getProductId(), 00106 'product_id' => $this->getProductId(), 00107 )); 00108 }
getRowUrl | ( | $ | row | ) | [protected] |