/** * @param \F3\Fluid\Core\ViewHelper\AbstractViewHelper $viewHelper * @return void * @author Sebastian Kurfürst <*****@*****.**> */ protected function injectDependenciesIntoViewHelper(\F3\Fluid\Core\ViewHelper\AbstractViewHelper $viewHelper) { $viewHelper->setViewHelperVariableContainer($this->viewHelperVariableContainer); $viewHelper->setTemplateVariableContainer($this->templateVariableContainer); $viewHelper->setControllerContext($this->controllerContext); $viewHelper->setArguments($this->arguments); if ($viewHelper instanceof \F3\Fluid\Core\ViewHelper\TagBasedViewHelper) { $viewHelper->injectTagBuilder($this->tagBuilder); } }
/** * Sets the tag name to $this->tagName. * Additionally, sets all tag attributes which were registered in * $this->tagAttributes and additionalArguments. * * Will be invoked just before the render method. * * @return void * @author Bastian Waidelich <*****@*****.**> * @api */ public function initialize() { parent::initialize(); $this->tag->reset(); $this->tag->setTagName($this->tagName); if (is_array($this->arguments['additionalAttributes'])) { $this->tag->addAttributes($this->arguments['additionalAttributes']); } foreach ($this->tagAttributes as $attributeName) { if ($this->arguments->hasArgument($attributeName) && $this->arguments[$attributeName] !== '') { $this->tag->addAttribute($attributeName, $this->arguments[$attributeName]); } } }