*/ class Mage_Adminhtml_Block_Notification_Survey extends Mage_Adminhtml_Block_Template { /** * Check whether survey question can show * * @return boolean */ public function canShow() { $adminSession = Mage::getSingleton('admin/session'); $seconds = intval(date('s', time())); if ($adminSession->getHideSurveyQuestion() || !$adminSession->isAllowed('all') || Mage_AdminNotification_Model_Survey::isSurveyViewed() || !Mage_AdminNotification_Model_Survey::isSurveyUrlValid()) { return false; } return true; } /** * Return survey url * * @return string */ public function getSurveyUrl() { return Mage_AdminNotification_Model_Survey::getSurveyUrl(); } }