Public Member Functions | |
__construct () | |
getGridUrl () | |
getRowUrl ($row) | |
Protected Member Functions | |
_prepareCollection () | |
_prepareColumns () |
Definition at line 34 of file Reviews.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 Reviews.php.
00038 { 00039 parent::__construct(); 00040 $this->setId('reviewsGrid'); 00041 $this->setUseAjax(true); 00042 }
_prepareCollection | ( | ) | [protected] |
Prepare grid collection object
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 44 of file Reviews.php.
00045 { 00046 $collection = Mage::getResourceModel('customer/customer_collection') 00047 ->addNameToSelect() 00048 ->addAttributeToSelect('email') 00049 ->addAttributeToSelect('created_at') 00050 ->joinAttribute('billing_postcode', 'customer_address/postcode', 'default_billing') 00051 ->joinAttribute('billing_city', 'customer_address/city', 'default_billing') 00052 ->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing') 00053 ->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing'); 00054 00055 $this->setCollection($collection); 00056 00057 return parent::_prepareCollection(); 00058 }
_prepareColumns | ( | ) | [protected] |
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 60 of file Reviews.php.
00061 { 00062 $this->addColumn('entity_id', array( 00063 'header' => Mage::helper('customer')->__('ID'), 00064 'width' => 5, 00065 'align' => 'center', 00066 'sortable' => true, 00067 'index' => 'entity_id' 00068 )); 00069 00070 $this->addColumn('name', array( 00071 'header' => Mage::helper('customer')->__('Name'), 00072 'index' => 'name' 00073 )); 00074 00075 $this->addColumn('email', array( 00076 'header' => Mage::helper('customer')->__('Email'), 00077 'width' => 40, 00078 'align' => 'center', 00079 'index' => 'email' 00080 )); 00081 00082 $this->addColumn('telephone', array( 00083 'header' => Mage::helper('customer')->__('Telephone'), 00084 'align' => 'center', 00085 'index' => 'billing_telephone' 00086 )); 00087 00088 $this->addColumn('billing_postcode', array( 00089 'header' => Mage::helper('customer')->__('ZIP/Postal Code'), 00090 'index' => 'billing_postcode', 00091 )); 00092 00093 $this->addColumn('billing_country_id', array( 00094 'header' => Mage::helper('customer')->__('Country'), 00095 'type' => 'country', 00096 'index' => 'billing_country_id', 00097 )); 00098 00099 $this->addColumn('customer_since', array( 00100 'header' => Mage::helper('customer')->__('Customer Since'), 00101 'type' => 'date', 00102 'format' => 'Y.m.d', 00103 'index' => 'created_at', 00104 )); 00105 00106 $this->addColumn('action', 00107 array( 00108 'header' => Mage::helper('customer')->__('Action'), 00109 'width' => '50px', 00110 'type' => 'action', 00111 'getter' => 'getId', 00112 'actions' => array( 00113 array( 00114 'caption' => Mage::helper('customer')->__('Edit'), 00115 'url' => array( 00116 'base'=>'*/catalog_product_review/edit' 00117 ), 00118 'field' => 'id' 00119 ) 00120 ), 00121 'filter' => false, 00122 'sortable' => false, 00123 )); 00124 00125 $this->setColumnFilter('entity_id') 00126 ->setColumnFilter('email') 00127 ->setColumnFilter('name'); 00128 00129 $this->addExportType('*/*/exportCsv', Mage::helper('customer')->__('CSV')); 00130 $this->addExportType('*/*/exportXml', Mage::helper('customer')->__('XML')); 00131 return parent::_prepareColumns(); 00132 }
getGridUrl | ( | ) |
getRowUrl | ( | $ | row | ) |
Definition at line 139 of file Reviews.php.
00140 { 00141 return $this->getUrl('*/catalog_product_review/edit', array('id'=>$row->getId())); 00142 }