Public Member Functions | |
__construct () | |
getGridUrl () | |
Protected Member Functions | |
_prepareCollection () | |
_prepareColumns () |
Definition at line 34 of file Tags.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 Tags.php.
00038 { 00039 parent::__construct(); 00040 $this->setId('ordersGrid'); 00041 $this->setUseAjax(true); 00042 }
_prepareCollection | ( | ) | [protected] |
Prepare grid collection object
Reimplemented from Mage_Adminhtml_Block_Widget_Grid.
Definition at line 44 of file Tags.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 Tags.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 $this->addColumn('name', array( 00070 'header' => Mage::helper('customer')->__('Name'), 00071 'index' =>'name' 00072 )); 00073 $this->addColumn('email', array( 00074 'header' => Mage::helper('customer')->__('Email'), 00075 'width' =>40, 00076 'align' =>'center', 00077 'index' =>'email' 00078 )); 00079 $this->addColumn('telephone', array( 00080 'header' => Mage::helper('customer')->__('Telephone'), 00081 'align' =>'center', 00082 'index' =>'billing_telephone' 00083 )); 00084 $this->addColumn('billing_postcode', array( 00085 'header' => Mage::helper('customer')->__('ZIP/Post Code'), 00086 'index' =>'billing_postcode', 00087 )); 00088 $this->addColumn('billing_country_id', array( 00089 'header' => Mage::helper('customer')->__('Country'), 00090 'type' => 'country', 00091 'index' => 'billing_country_id', 00092 )); 00093 $this->addColumn('customer_since', array( 00094 'header' => Mage::helper('customer')->__('Customer Since'), 00095 'type' => 'date', 00096 'format' => 'Y.m.d', 00097 'index' =>'created_at', 00098 )); 00099 $this->addColumn('action', array( 00100 'header' => Mage::helper('customer')->__('Action'), 00101 'align' =>'center', 00102 'format' =>'<a href="'.$this->getUrl('*/sales/edit/id/$entity_id').'">'.Mage::helper('customer')->__('Edit').'</a>', 00103 'filter' =>false, 00104 'sortable' =>false, 00105 'is_system' =>true 00106 )); 00107 00108 $this->setColumnFilter('entity_id') 00109 ->setColumnFilter('email') 00110 ->setColumnFilter('name'); 00111 00112 $this->addExportType('*/*/exportCsv', Mage::helper('customer')->__('CSV')); 00113 $this->addExportType('*/*/exportXml', Mage::helper('customer')->__('XML')); 00114 return parent::_prepareColumns(); 00115 }
getGridUrl | ( | ) |