Mage_Adminhtml_Block_Customer_Edit_Tab_Newsletter_Grid Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Customer_Edit_Tab_Newsletter_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

 __construct ()
 getGridUrl ()

Protected Member Functions

 _prepareCollection ()
 _prepareColumns ()


Detailed Description

Definition at line 34 of file Grid.php.


Constructor & Destructor Documentation

__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 Grid.php.

00038     {
00039         parent::__construct();
00040         $this->setId('queueGrid');
00041         $this->setDefaultSort('start_at');
00042         $this->setDefaultDir('desc');
00043 
00044         $this->setUseAjax(true);
00045 
00046         $this->setEmptyText(Mage::helper('customer')->__('No Newsletter Found'));
00047 
00048     }


Member Function Documentation

_prepareCollection (  )  [protected]

Prepare grid collection object

Returns:
this

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 55 of file Grid.php.

00056     {
00057         $collection = Mage::getResourceModel('newsletter/queue_collection')
00058             ->addTemplateInfo()
00059             ->addSubscriberFilter(Mage::registry('subscriber')->getId());
00060 
00061         $this->setCollection($collection);
00062 
00063         return parent::_prepareCollection();
00064     }

_prepareColumns (  )  [protected]

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 66 of file Grid.php.

00067     {
00068         $this->addColumn('queue_id', array(
00069             'header'    =>  Mage::helper('customer')->__('ID'),
00070             'align'     =>  'left',
00071             'index'     =>  'queue_id',
00072             'width'     =>  10
00073         ));
00074 
00075         $this->addColumn('start_at', array(
00076             'header'    =>  Mage::helper('customer')->__('Newsletter Start'),
00077             'type'      =>  'datetime',
00078             'align'     =>  'center',
00079             'index'     =>  'queue_start_at',
00080             'default'   =>  ' ---- '
00081         ));
00082 
00083         $this->addColumn('finish_at', array(
00084             'header'    =>  Mage::helper('customer')->__('Newsletter Finish'),
00085             'type'      =>  'datetime',
00086             'align'     =>  'center',
00087             'index'     =>  'queue_finish_at',
00088             'gmtoffset' => true,
00089             'default'   =>  ' ---- '
00090         ));
00091 
00092         $this->addColumn('letter_sent_at', array(
00093             'header'    =>  Mage::helper('customer')->__('Newsletter Received'),
00094             'type'      =>  'datetime',
00095             'align'     =>  'center',
00096             'index'     =>  'letter_sent_at',
00097             'gmtoffset' => true,
00098             'default'   =>  ' ---- '
00099         ));
00100 
00101         $this->addColumn('template_subject', array(
00102             'header'    =>  Mage::helper('customer')->__('Subject'),
00103             'align'     =>  'center',
00104             'index'     =>  'template_subject'
00105         ));
00106 
00107          $this->addColumn('status', array(
00108             'header'    =>  Mage::helper('customer')->__('Status'),
00109             'align'     =>  'center',
00110             'filter'    =>  'adminhtml/customer_edit_tab_newsletter_grid_filter_status',
00111             'index'     => 'queue_status',
00112             'renderer'  =>  'adminhtml/customer_edit_tab_newsletter_grid_renderer_status'
00113         ));
00114 
00115         $this->addColumn('action', array(
00116             'header'    =>  Mage::helper('customer')->__('Action'),
00117             'align'     =>  'center',
00118             'filter'    =>  false,
00119             'sortable'  =>  false,
00120             'renderer'  =>  'adminhtml/customer_edit_tab_newsletter_grid_renderer_action'
00121         ));
00122 
00123         return parent::_prepareColumns();
00124     }

getGridUrl (  ) 

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 50 of file Grid.php.

00051     {
00052         return $this->getUrl('*/*/newsletter', array('_current'=>true));
00053     }


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

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