Beispiel #1
0
 protected function _toHtml()
 {
     if ($this->_visible) {
         return parent::_toHtml();
     } else {
         return '';
     }
 }
Beispiel #2
0
 /**
  *
  * 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();
 }
Beispiel #3
0
 /**
  *
  * 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();
 }
 protected function _toHtml()
 {
     $allowed_blocks = array('content');
     if (Mage::getStoreConfig('magebridge/settings/caching_gzip') == 1 && in_array($this->getNameInLayout(), $allowed_blocks)) {
         $cached = $this->_loadCache();
         if (!$cached) {
             $html = parent::_toHtml();
             $html = trim($html);
             $compressed = @base64_encode($html);
             $compressed = @gzcompress($compressed, 6);
             if ($compressed) {
                 return $compressed;
             }
         }
         return $html;
     }
     return parent::_toHtml();
 }