Mage_Adminhtml_Block_Newsletter_Template_Grid Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Newsletter_Template_Grid:

Mage_Adminhtml_Block_Widget_Grid Mage_Adminhtml_Block_Widget Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 getRowUrl ($row)

Protected Member Functions

 _construct ()
 _prepareCollection ()
 _prepareColumns ()


Detailed Description

Definition at line 34 of file Grid.php.


Member Function Documentation

_construct (  )  [protected]

Internal constructor, that is called from real constructor

Please override this one instead of overriding real __construct constructor

Please override this one instead of overriding real __construct constructor

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 36 of file Grid.php.

00037     {
00038         $this->setEmptyText(Mage::helper('newsletter')->__('No Templates Found'));
00039     }

_prepareCollection (  )  [protected]

Prepare grid collection object

Returns:
this

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 41 of file Grid.php.

00042     {
00043         $collection = Mage::getResourceSingleton('newsletter/template_collection')
00044             ->useOnlyActual();
00045 
00046         $this->setCollection($collection);
00047 
00048         return parent::_prepareCollection();
00049     }

_prepareColumns (  )  [protected]

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 51 of file Grid.php.

00052     {
00053         $this->addColumn('template_code',
00054             array('header'=>Mage::helper('newsletter')->__('ID'), 'align'=>'center', 'index'=>'template_id'));
00055         $this->addColumn('code',
00056             array(
00057                 'header'=>Mage::helper('newsletter')->__('Template Name'),
00058                 'index'=>'template_code'
00059         ));
00060 
00061         $this->addColumn('added_at',
00062             array(
00063                 'header'=>Mage::helper('newsletter')->__('Date Added'),
00064                 'index'=>'added_at',
00065                 'gmtoffset' => true,
00066                 'type'=>'datetime'
00067         ));
00068 
00069         $this->addColumn('modified_at',
00070             array(
00071                 'header'=>Mage::helper('newsletter')->__('Date Updated'),
00072                 'index'=>'modified_at',
00073                 'gmtoffset' => true,
00074                 'type'=>'datetime'
00075         ));
00076 
00077         $this->addColumn('subject',
00078             array(
00079                 'header'=>Mage::helper('newsletter')->__('Subject'),
00080                 'index'=>'template_subject'
00081         ));
00082 
00083         $this->addColumn('sender',
00084             array(
00085                 'header'=>Mage::helper('newsletter')->__('Sender'),
00086                 'index'=>'template_sender_email',
00087                 'renderer' => 'adminhtml/newsletter_template_grid_renderer_sender'
00088         ));
00089 
00090         $this->addColumn('type',
00091             array(
00092                 'header'=>Mage::helper('newsletter')->__('Template Type'),
00093                 'index'=>'template_type',
00094                 'type' => 'options',
00095                 'options' => array(
00096                     Mage_Newsletter_Model_Template::TYPE_HTML   => 'html',
00097                     Mage_Newsletter_Model_Template::TYPE_TEXT   => 'text'
00098                 ),
00099         ));
00100 
00101         $this->addColumn('action',
00102             array(
00103                 'header'    => Mage::helper('newsletter')->__('Action'),
00104                 'index'     =>'template_id',
00105                 'sortable' =>false,
00106                 'filter'   => false,
00107                 'no_link' => true,
00108                 'width'    => '170px',
00109                 'renderer' => 'adminhtml/newsletter_template_grid_renderer_action'
00110         ));
00111 
00112         return $this;
00113     }

getRowUrl ( row  ) 

Definition at line 115 of file Grid.php.

00116     {
00117         return $this->getUrl('*/*/edit', array('id'=>$row->getId()));
00118     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:22:52 2009 for Magento by  doxygen 1.5.8