Public Member Functions | |
render (Varien_Object $row) |
Definition at line 35 of file Severity.php.
render | ( | Varien_Object $ | row | ) |
Renders grid column
Varien_Object | $row |
Reimplemented from Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract.
Definition at line 44 of file Severity.php.
00045 { 00046 $notice = Mage::getSingleton('adminnotification/inbox'); 00047 00048 switch ($row->getData($this->getColumn()->getIndex())) { 00049 case Mage_AdminNotification_Model_Inbox::SEVERITY_CRITICAL: 00050 $class = 'critical'; 00051 $value = $notice->getSeverities(Mage_AdminNotification_Model_Inbox::SEVERITY_CRITICAL); 00052 break; 00053 case Mage_AdminNotification_Model_Inbox::SEVERITY_MAJOR: 00054 $class = 'major'; 00055 $value = $notice->getSeverities(Mage_AdminNotification_Model_Inbox::SEVERITY_MAJOR); 00056 break; 00057 case Mage_AdminNotification_Model_Inbox::SEVERITY_MINOR: 00058 $class = 'minor'; 00059 $value = $notice->getSeverities(Mage_AdminNotification_Model_Inbox::SEVERITY_MINOR); 00060 break; 00061 case Mage_AdminNotification_Model_Inbox::SEVERITY_NOTICE: 00062 $class = 'notice'; 00063 $value = $notice->getSeverities(Mage_AdminNotification_Model_Inbox::SEVERITY_NOTICE); 00064 break; 00065 } 00066 return '<span class="grid-severity-' . $class . '">' . $value . '</span>'; 00067 }