示例#1
0
 /**
  * Initialize block window
  *
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setHeaderText($this->escapeHtml($this->__('Incoming Message')));
     $this->setCloseText($this->escapeHtml($this->__('close')));
     $this->setReadDetailsText($this->escapeHtml($this->__('Read details')));
     $this->setNoticeText($this->escapeHtml($this->__('NOTICE')));
     $this->setMinorText($this->escapeHtml($this->__('MINOR')));
     $this->setMajorText($this->escapeHtml($this->__('MAJOR')));
     $this->setCriticalText($this->escapeHtml($this->__('CRITICAL')));
     $this->setNoticeMessageText($this->escapeHtml($this->getLastNotice()->getTitle()));
     $this->setNoticeMessageUrl($this->escapeUrl($this->getLastNotice()->getUrl()));
     switch ($this->getLastNotice()->getSeverity()) {
         default:
         case Mage_AdminNotification_Model_Inbox::SEVERITY_NOTICE:
             $severity = 'SEVERITY_NOTICE';
             break;
         case Mage_AdminNotification_Model_Inbox::SEVERITY_MINOR:
             $severity = 'SEVERITY_MINOR';
             break;
         case Mage_AdminNotification_Model_Inbox::SEVERITY_MAJOR:
             $severity = 'SEVERITY_MAJOR';
             break;
         case Mage_AdminNotification_Model_Inbox::SEVERITY_CRITICAL:
             $severity = 'SEVERITY_CRITICAL';
             break;
     }
     $this->setNoticeSeverity($severity);
 }
 /**
  * Initialize block window
  *
  */
 protected function _construct()
 {
     $this->setMarkAllReadText(Mage::helper('adminnotificationadvanced')->__('Mark all read'));
     $this->setMarkAllReadUrl(Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/notificationadvanced/markallread'));
     $this->setDeleteAllText($this->__('Delete all'));
     $this->setDeleteAllUrl(Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/notificationadvanced/deleteall'));
     parent::_construct();
 }