Пример #1
0
 /**
  * Retrieve placeholder replacer
  *
  * @param array $matches Matches by preg_replace_callback
  * @return string
  */
 protected function _getPlaceholderReplacer($matches)
 {
     $container = $this->_placeholder->getContainerClass();
     /**
      * In developer mode blocks will be rendered separately
      * This should simplify debugging _renderBlock()
      */
     if ($container && !Mage::getIsDeveloperMode()) {
         $container = new $container($this->_placeholder);
         $blockContent = $matches[1];
         $container->saveCache($blockContent);
     }
     return $this->_placeholder->getReplacer();
 }
Пример #2
0
 /**
  * Replace container placeholder in content on container content
  *
  * @param string $content
  * @param string $containerContent
  */
 protected function _applyToContent(&$content, $containerContent)
 {
     $containerContent = $this->_placeholder->getStartTag() . $containerContent . $this->_placeholder->getEndTag();
     $content = str_replace($this->_placeholder->getReplacer(), $containerContent, $content);
 }
 /**
  * Retrieve placeholder replacer
  *
  * @param array $matches Matches by preg_replace_callback
  * @return string
  */
 protected function _getPlaceholderReplacer($matches)
 {
     return $this->_placeholder->getReplacer();
 }