Mage_Adminhtml_Block_Newsletter_Problem_Grid Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Newsletter_Problem_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 ()

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 36 of file Grid.php.

00037     {
00038         parent::__construct();
00039         $this->setId('problemGrid');
00040         $this->setSaveParametersInSession(true);
00041         $this->setMessageBlockVisibility(true);
00042         $this->setUseAjax(true);
00043         $this->setEmptyText(Mage::helper('newsletter')->__('No problems found'));
00044     }


Member Function Documentation

_prepareCollection (  )  [protected]

Prepare grid collection object

Returns:
this

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 46 of file Grid.php.

00047     {
00048         $collection = Mage::getResourceModel('newsletter/problem_collection')
00049             ->addSubscriberInfo()
00050             ->addQueueInfo();
00051 
00052         $this->setCollection($collection);
00053 
00054         return parent::_prepareCollection();
00055     }

_prepareColumns (  )  [protected]

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 57 of file Grid.php.

00058     {
00059         $this->addColumn('checkbox', array(
00060             'sortable'  => false,
00061             'filter'    => 'adminhtml/newsletter_problem_grid_filter_checkbox',
00062             'renderer'  => 'adminhtml/newsletter_problem_grid_renderer_checkbox',
00063             'width'     => '20px'
00064         ));
00065 
00066         $this->addColumn('problem_id', array(
00067             'header' => Mage::helper('newsletter')->__('ID'),
00068             'index'  => 'problem_id',
00069             'width'  => '50px'
00070         ));
00071 
00072         $this->addColumn('subscriber', array(
00073             'header' => Mage::helper('newsletter')->__('Subscriber'),
00074             'index'  => 'subscriber_id',
00075             'format' => '#$subscriber_id $customer_name ($subscriber_email)'
00076         ));
00077 
00078         $this->addColumn('queue_start', array(
00079             'header' => Mage::helper('newsletter')->__('Queue Date Start'),
00080             'index'  => 'queue_start_at',
00081             'gmtoffset' => true,
00082             'type'   => 'datetime'
00083         ));
00084 
00085         $this->addColumn('queue', array(
00086             'header' => Mage::helper('newsletter')->__('Queue Subject'),
00087             'index'  => 'template_subject'
00088         ));
00089 
00090         $this->addColumn('problem_code', array(
00091             'header' => Mage::helper('newsletter')->__('Error Code'),
00092             'index'  => 'problem_error_code',
00093             'type'   => 'number'
00094         ));
00095 
00096         $this->addColumn('problem_text', array(
00097             'header' => Mage::helper('newsletter')->__('Error Text'),
00098             'index'  => 'problem_error_text'
00099         ));
00100         return parent::_prepareColumns();
00101     }


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

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