public function getLayout() { $layout = parent::getLayout(); if ($layout) { return $layout; } $layout = Mage::app()->getFrontController()->getAction()->getLayout(); parent::setLayout($layout); return $layout; }
public function testSetGetLayout() { $this->assertNull($this->_helper->getLayout()); $this->assertInstanceof(get_class($this->_helper), $this->_helper->setLayout(Mage::app()->getLayout())); $this->assertInstanceOf('Mage_Core_Model_Layout', $this->_helper->getLayout()); }