*/ class Mage_Page_Block_Html_Welcome extends Mage_Core_Block_Template { /** * Get block messsage * * @return string */ protected function _toHtml() { if (empty($this->_data['welcome'])) { if (Mage::isInstalled() && Mage::getSingleton('customer/session')->isLoggedIn()) { $this->_data['welcome'] = $this->__('Welcome, %s!', $this->escapeHtml(Mage::getSingleton('customer/session')->getCustomer()->getName())); } else { $this->_data['welcome'] = Mage::getStoreConfig('design/header/welcome'); } } return $this->_data['welcome']; } /** * Get tags array for saving cache * * @return array */ public function getCacheTags() { if (Mage::getSingleton('customer/session')->isLoggedIn()) { $this->addModelTags(Mage::getSingleton('customer/session')->getCustomer()); } return parent::getCacheTags(); } }