예제 #1
0
 /**
  * Renders tag content of ViewHelper and inserts variables
  * in $variables into $variableContainer while keeping backups
  * of each existing variable, restoring it after rendering.
  * Returns the output of the renderChildren() method on $viewHelper.
  *
  * @param AbstractViewHelper $viewHelper
  * @param TemplateVariableContainer $variableContainer
  * @param array $variables
  * @return mixed
  */
 public static function renderChildrenWithVariables(AbstractViewHelper $viewHelper, TemplateVariableContainer $variableContainer, array $variables)
 {
     $backups = self::backupVariables($variableContainer, $variables);
     $content = $viewHelper->renderChildren();
     self::restoreVariables($variableContainer, $variables, $backups);
     return $content;
 }
 /**
  * Helper method which triggers the rendering of everything between the
  * opening and the closing tag. In addition change -> to ->
  *
  * @return mixed The finally rendered child nodes.
  */
 public function renderChildren()
 {
     $content = parent::renderChildren();
     $content = str_replace('->', '->', $content);
     return $content;
 }
예제 #3
0
 /**
  * @return string
  */
 public function renderChildren()
 {
     // Make sure the current extension name always propagates to child nodes
     static::setExtensionNameInRenderingContext($this->renderingContext, $this->getExtensionName());
     return parent::renderChildren();
 }
예제 #4
0
 /**
  * @return string
  */
 public function renderChildren()
 {
     // Make sure the current extension name always propagates to child nodes
     $this->viewHelperVariableContainer->addOrUpdate(self::SCOPE, self::SCOPE_VARIABLE_EXTENSIONNAME, $this->getExtensionName());
     return parent::renderChildren();
 }