Mage_Adminhtml_Block_Notification_Grid Class Reference

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

 getRowClass (Varien_Object $row)
 getRowClickCallback ()

Protected Member Functions

 _construct ()
 _prepareCollection ()
 _prepareColumns ()
 _prepareMassaction ()


Detailed Description

Definition at line 35 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 37 of file Grid.php.

00038     {
00039         $this->setSaveParametersInSession(true);
00040         $this->setId('notificationGrid');
00041         $this->setIdFieldName('notification_id');
00042         $this->setDefaultSort('date_added', 'desc');
00043         $this->setFilterVisibility(false);
00044     }

_prepareCollection (  )  [protected]

Init backups collection

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 49 of file Grid.php.

00050     {
00051         $collection = Mage::getModel('adminnotification/inbox')
00052             ->getCollection()
00053             ->addRemoveFilter();
00054         $this->setCollection($collection);
00055         return parent::_prepareCollection();
00056     }

_prepareColumns (  )  [protected]

Configuration of grid

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 61 of file Grid.php.

00062     {
00063         $this->addColumn('severity', array(
00064             'header'    => Mage::helper('adminnotification')->__('Severity'),
00065             'width'     => '60px',
00066             'index'     => 'severity',
00067             'renderer'  => 'adminhtml/notification_grid_renderer_severity',
00068         ));
00069 
00070         $this->addColumn('date_added', array(
00071             'header'    => Mage::helper('adminnotification')->__('Date Added'),
00072             'index'     => 'date_added',
00073             'width'     => '150px',
00074             'type'      => 'datetime'
00075         ));
00076 
00077         $this->addColumn('title', array(
00078             'header'    => Mage::helper('adminnotification')->__('Message'),
00079             'index'     => 'title',
00080             'renderer'  => 'adminhtml/notification_grid_renderer_notice',
00081         ));
00082 
00083         $this->addColumn('actions', array(
00084             'header'    => Mage::helper('adminnotification')->__('Actions'),
00085             'width'     => '250px',
00086             'sortable'  => false,
00087             'renderer'  => 'adminhtml/notification_grid_renderer_actions',
00088         ));
00089 
00090         return parent::_prepareColumns();
00091     }

_prepareMassaction (  )  [protected]

Prepare mass action

Reimplemented from Mage_Adminhtml_Block_Widget_Grid.

Definition at line 96 of file Grid.php.

00097     {
00098         $this->setMassactionIdField('notification_id');
00099         $this->getMassactionBlock()->setFormFieldName('notification');
00100 
00101         $this->getMassactionBlock()->addItem('mark_as_read', array(
00102              'label'    => Mage::helper('adminnotification')->__('Mark as Read'),
00103              'url'      => $this->getUrl('*/*/massMarkAsRead', array('_current'=>true)),
00104         ));
00105 
00106         $this->getMassactionBlock()->addItem('remove', array(
00107              'label'    => Mage::helper('adminnotification')->__('Remove'),
00108              'url'      => $this->getUrl('*/*/massRemove'),
00109              'confirm'  => Mage::helper('adminnotification')->__('Are you sure?')
00110         ));
00111 
00112 //        $this->getColumn('massaction')->setWidth('30px');
00113 
00114         return $this;
00115     }

getRowClass ( Varien_Object row  ) 

Definition at line 117 of file Grid.php.

00117                                                     {
00118         return $row->getIsRead() ? 'read' : 'unread';
00119     }

getRowClickCallback (  ) 

Definition at line 121 of file Grid.php.

00122     {
00123         return false;
00124     }


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