Mage_Adminhtml_Block_Newsletter_Queue_Grid Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Newsletter_Queue_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 ()
 getRowUrl ($row)

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         $this->setSaveParametersInSession(true);
00044         $this->setUseAjax(true);
00045     }


Member Function Documentation

_prepareCollection (  )  [protected]

Prepare grid collection object

Returns:
this

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 47 of file Grid.php.

00048     {
00049         $collection = Mage::getResourceModel('newsletter/queue_collection')
00050             ->addTemplateInfo()
00051             ->addSubscribersInfo();
00052 
00053         $this->setCollection($collection);
00054 
00055         return parent::_prepareCollection();
00056     }

_prepareColumns (  )  [protected]

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 58 of file Grid.php.

00059     {
00060         $this->addColumn('queue_id', array(
00061             'header'    =>  Mage::helper('newsletter')->__('ID'),
00062             'index'     =>  'queue_id',
00063             'width'     =>  10
00064         ));
00065 
00066         $this->addColumn('start_at', array(
00067             'header'    =>  Mage::helper('newsletter')->__('Queue Start'),
00068             'type'      =>  'datetime',
00069             'index'     =>  'queue_start_at',
00070             'gmtoffset' => true,
00071             'default'   =>  ' ---- '
00072         ));
00073 
00074         $this->addColumn('finish_at', array(
00075             'header'    =>  Mage::helper('newsletter')->__('Queue Finish'),
00076             'type'      =>  'datetime',
00077             'index'     =>  'queue_finish_at',
00078             'gmtoffset' => true,
00079             'default'   =>  ' ---- '
00080         ));
00081 
00082         $this->addColumn('template_subject', array(
00083             'header'    =>  Mage::helper('newsletter')->__('Subject'),
00084             'index'     =>  'template_subject'
00085         ));
00086 
00087          $this->addColumn('status', array(
00088             'header'    => Mage::helper('newsletter')->__('Status'),
00089             'index'     => 'queue_status',
00090             'type'      => 'options',
00091             'options'   => array(
00092                 Mage_Newsletter_Model_Queue::STATUS_SENT    => Mage::helper('newsletter')->__('Sent'),
00093                 Mage_Newsletter_Model_Queue::STATUS_CANCEL  => Mage::helper('newsletter')->__('Cancelled'),
00094                 Mage_Newsletter_Model_Queue::STATUS_NEVER   => Mage::helper('newsletter')->__('Not Sent'),
00095                 Mage_Newsletter_Model_Queue::STATUS_SENDING => Mage::helper('newsletter')->__('Sending'),
00096                 Mage_Newsletter_Model_Queue::STATUS_PAUSE   => Mage::helper('newsletter')->__('Paused'),
00097             ),
00098             'width'     => '100px',
00099         ));
00100 
00101         $this->addColumn('subscribers_sent', array(
00102             'header'    =>  Mage::helper('newsletter')->__('Processed'),
00103             'type'      => 'number',
00104             'index'     => 'subscribers_sent'
00105         ));
00106 
00107         $this->addColumn('subscribers_total', array(
00108             'header'    =>  Mage::helper('newsletter')->__('Recipients'),
00109             'type'      => 'number',
00110             'index'     => 'subscribers_total'
00111         ));
00112 
00113         $this->addColumn('action', array(
00114             'header'    =>  Mage::helper('newsletter')->__('Action'),
00115             'filter'    =>  false,
00116             'sortable'  =>  false,
00117             'no_link'   => true,
00118             'width'     => '100px',
00119             'renderer'  =>  'adminhtml/newsletter_queue_grid_renderer_action'
00120         ));
00121 
00122         return parent::_prepareColumns();
00123     }

getRowUrl ( row  ) 

Definition at line 125 of file Grid.php.

00126     {
00127         return $this->getUrl('*/*/edit', array('id'=>$row->getId()));
00128     }


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

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