Public Member Functions | |
__construct () | |
getGridUrl () | |
Protected Member Functions | |
_prepareCollection () | |
_afterLoadCollection () | |
_prepareColumns () | |
getRowUrl ($row) |
Definition at line 34 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 $this->setFilterVisibility(false); 00045 }
_afterLoadCollection | ( | ) | [protected] |
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 62 of file Tag.php.
00063 { 00064 $this->getCollection()->addProductName(); 00065 return parent::_afterLoadCollection(); 00066 }
_prepareCollection | ( | ) | [protected] |
Prepare grid collection object
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 47 of file Tag.php.
00048 { 00049 $tagId = Mage::registry('tagId'); 00050 00051 if( $this->getCustomerId() instanceof Mage_Customer_Model_Customer ) { 00052 $this->setCustomerId( $this->getCustomerId()->getId() ); 00053 } 00054 00055 $collection = Mage::getResourceModel('tag/customer_collection') 00056 ->addCustomerFilter($this->getCustomerId()); 00057 00058 $this->setCollection($collection); 00059 return parent::_prepareCollection(); 00060 }
_prepareColumns | ( | ) | [protected] |
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 68 of file Tag.php.
00069 { 00070 $this->addColumn('name', array( 00071 'header' => Mage::helper('customer')->__('Tag Name'), 00072 'index' => 'name', 00073 )); 00074 00075 $this->addColumn('status', array( 00076 'header' => Mage::helper('customer')->__('Status'), 00077 'width' => '90px', 00078 'index' => 'status', 00079 'type' => 'options', 00080 'options' => array( 00081 Mage_Tag_Model_Tag::STATUS_DISABLED => Mage::helper('customer')->__('Disabled'), 00082 Mage_Tag_Model_Tag::STATUS_PENDING => Mage::helper('customer')->__('Pending'), 00083 Mage_Tag_Model_Tag::STATUS_APPROVED => Mage::helper('customer')->__('Approved'), 00084 ), 00085 'filter' => false, 00086 )); 00087 00088 $this->addColumn('product', array( 00089 'header' => Mage::helper('customer')->__('Product Name'), 00090 'index' => 'product', 00091 'filter' => false, 00092 'sortable' => false, 00093 )); 00094 00095 $this->addColumn('product_sku', array( 00096 'header' => Mage::helper('customer')->__('SKU'), 00097 'index' => 'product_sku', 00098 'filter' => false, 00099 'sortable' => false, 00100 )); 00101 00102 return parent::_prepareColumns(); 00103 }
getGridUrl | ( | ) |
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 113 of file Tag.php.
00114 { 00115 return $this->getUrl('*/customer/tagGrid', array( 00116 '_current' => true, 00117 'id' => $this->getCustomerId() 00118 )); 00119 }
getRowUrl | ( | $ | row | ) | [protected] |