public function testToHtmlWithContainer() { $listName = $this->_block->getNameInLayout(); $block1 = $this->_layout->addBlock('Mage_Core_Block_Text', '', $listName); $this->_layout->addContainer('container', 'Container', array(), $listName); $block2 = $this->_layout->addBlock('Mage_Core_Block_Text', '', 'container'); $block3 = $this->_layout->addBlock('Mage_Core_Block_Text', '', $listName); $block1->setText('text1'); $block2->setText('text2'); $block3->setText('text3'); $html = $this->_block->toHtml(); $this->assertEquals('text1text2text3', $html); }
public function testToHtmlWithContainer() { $listName = $this->_block->getNameInLayout(); $block1 = $this->_layout->addBlock('Mage_Core_Block_Text', '', $listName); //$this->_layout->insertContainer($listName, 'container'); $block2 = $this->_layout->addBlock('Mage_Core_Block_Text', '', 'container'); $block3 = $this->_layout->addBlock('Mage_Core_Block_Text', '', $listName); $block1->setText('text1'); $block2->setText('text2'); $block3->setText('text3'); ob_start(); $this->_block->toHtml(); $html = ob_get_clean(); $this->assertEquals('text1text2text3', $html); }
protected function _toHtml() { if ($this->_visible) { return parent::_toHtml(); } else { return ''; } }
/** * * Iterates through fieldsets and fetches complete html * * @return string */ protected function _toHtml() { $children = $this->getLayout()->getChildBlocks($this->getNameInLayout()); $total = count($children); $i = 0; $this->setText(''); /** @var $block Mage_Core_Block_Abstract */ foreach ($children as $block) { $i++; $block->setIsLastFieldset($i == $total); $this->addText($block->toHtml()); } return parent::_toHtml(); }
protected function _afterToHtml($html) { if (Mage::getStoreConfig('magebridge/settings/caching_gzip') == 1) { if (!empty($html)) { $uncompressed = @gzuncompress($html); $uncompressed = @base64_decode($uncompressed); if ($uncompressed != FALSE && !empty($uncompressed)) { return $uncompressed; } } return $html; } return parent::_afterToHtml($html); }
/** * * Iterates through fieldsets and fetches complete html * * @return string */ protected function _toHtml() { $children = $this->getSortedChildren(); $total = count($children); $i = 0; $this->setText(''); foreach ($children as $name) { $block = $this->getLayout()->getBlock($name); if (!$block) { Mage::throwException(Mage::helper('Mage_Core_Helper_Data')->__('Invalid block: %s', $name)); } $i++; $block->setIsLastFieldset($i == $total); $this->addText($block->toHtml()); } return parent::_toHtml(); }
/** * generates unique id for this block * * @return Mage_Core_Block_Abstract|void */ protected function _prepareLayout() { if ($this->hasDummyOutput()) { $this->bigPipeId = uniqid(); } parent::_prepareLayout(); }
/** * Initialize grid params * */ public function __construct() { parent::__construct(); $this->setId('billing_agreement_orders'); }
/** * Initialize grid params * */ protected function _construct() { parent::_construct(); $this->setId('billing_agreement_orders'); }