Mage_Adminhtml_Block_Notification_Toolbar Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Notification_Toolbar:

Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object Mage_Adminhtml_Block_Notification_Window

List of all members.

Public Member Functions

 isShow ()
 getCriticalCount ()
 getMajorCount ()
 getMinorCount ()
 getNoticeCount ()
 getNoticesInboxUrl ()
 getLatestNotice ()
 getLatestNoticeUrl ()
 isMessageWindowAvailable ()

Protected Member Functions

 _construct ()
 _getHelper ()


Detailed Description

Definition at line 35 of file Toolbar.php.


Member Function Documentation

_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.

00042     {}

_getHelper (  )  [protected]

Retrieve helper

Returns:
Mage_AdminNotification_Helper_Data

Definition at line 49 of file Toolbar.php.

00050     {
00051         return Mage::helper('adminnotification');
00052     }

getCriticalCount (  ) 

Retrieve count of critical errors

Returns:
int

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

Returns:
string

Definition at line 132 of file Toolbar.php.

00133     {
00134         return  $this->_getHelper()
00135             ->getLatestNotice()->getTitle();
00136     }

getLatestNoticeUrl (  ) 

Retrieve Last Notice URL

Returns:
string

Definition at line 143 of file Toolbar.php.

00144     {
00145         return $this->_getHelper()->getLatestNotice()->getUrl();
00146     }

getMajorCount (  ) 

Retrieve count of major errors

Returns:
int

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

Returns:
int

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

Returns:
int

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

Returns:
string

Definition at line 122 of file Toolbar.php.

00123     {
00124         return $this->getUrl('adminhtml/notification');
00125     }

isMessageWindowAvailable (  ) 

Check is Message Window Available

Returns:
bool

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

Returns:
bool

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     }


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