Public Member Functions | |
isShow () | |
getCriticalCount () | |
getMajorCount () | |
getMinorCount () | |
getNoticeCount () | |
getNoticesInboxUrl () | |
getLatestNotice () | |
getLatestNoticeUrl () | |
isMessageWindowAvailable () | |
Protected Member Functions | |
_construct () | |
_getHelper () |
Definition at line 35 of file Toolbar.php.
_construct | ( | ) | [protected] |
Initialize Toolbar block
Reimplemented from Mage_Core_Block_Abstract.
Reimplemented in Mage_Adminhtml_Block_Notification_Window.
Definition at line 41 of file Toolbar.php.
_getHelper | ( | ) | [protected] |
Retrieve helper
Definition at line 49 of file Toolbar.php.
00050 { 00051 return Mage::helper('adminnotification'); 00052 }
getCriticalCount | ( | ) |
Retrieve count of critical errors
Definition at line 78 of file Toolbar.php.
00079 { 00080 return $this->_getHelper() 00081 ->getUnreadNoticeCount(Mage_AdminNotification_Model_Inbox::SEVERITY_CRITICAL); 00082 }
getLatestNotice | ( | ) |
Retrieve last notice Title
Definition at line 132 of file Toolbar.php.
00133 { 00134 return $this->_getHelper() 00135 ->getLatestNotice()->getTitle(); 00136 }
getLatestNoticeUrl | ( | ) |
Retrieve Last Notice URL
Definition at line 143 of file Toolbar.php.
00144 { 00145 return $this->_getHelper()->getLatestNotice()->getUrl(); 00146 }
getMajorCount | ( | ) |
Retrieve count of major errors
Definition at line 89 of file Toolbar.php.
00090 { 00091 return $this->_getHelper() 00092 ->getUnreadNoticeCount(Mage_AdminNotification_Model_Inbox::SEVERITY_MAJOR); 00093 }
getMinorCount | ( | ) |
Retrieve count of minor errors
Definition at line 100 of file Toolbar.php.
00101 { 00102 return $this->_getHelper() 00103 ->getUnreadNoticeCount(Mage_AdminNotification_Model_Inbox::SEVERITY_MINOR); 00104 }
getNoticeCount | ( | ) |
Retrieve count of notices
Definition at line 111 of file Toolbar.php.
00112 { 00113 return $this->_getHelper() 00114 ->getUnreadNoticeCount(Mage_AdminNotification_Model_Inbox::SEVERITY_NOTICE); 00115 }
getNoticesInboxUrl | ( | ) |
Retrieve Notices Inbox URL
Definition at line 122 of file Toolbar.php.
00123 { 00124 return $this->getUrl('adminhtml/notification'); 00125 }
isMessageWindowAvailable | ( | ) |
Check is Message Window Available
Definition at line 153 of file Toolbar.php.
00154 { 00155 $block = $this->getLayout()->getBlock('notification_window'); 00156 if ($block) { 00157 return $block->canShow(); 00158 } 00159 return false; 00160 }
isShow | ( | ) |
Check is show toolbar
Definition at line 59 of file Toolbar.php.
00060 { 00061 if (!$this->isOutputEnabled('Mage_AdminNotification')) { 00062 return false; 00063 } 00064 if ($this->getRequest()->getControllerName() == 'notification') { 00065 return false; 00066 } 00067 if ($this->getCriticalCount() == 0 && $this->getMajorCount() == 0 && $this->getMinorCount() == 0 && $this->getNoticeCount() == 0) { 00068 return false; 00069 } 00070 return true; 00071 }