/** * Returns the name of the layout that is defined within the current template via <f:layout name="..." /> * If no layout is defined, this returns NULL * This requires the current rendering context in order to be able to evaluate the layout name * * @param RenderingContextInterface $renderingContext * @return string * @throws View\Exception */ public function getLayoutName(RenderingContextInterface $renderingContext) { $layoutName = $this->variableContainer->get('layoutName'); return $layoutName instanceof RootNode ? $layoutName->evaluate($renderingContext) : $layoutName; }
/** * Returns the name of the layout that is defined within the current template via <f:layout name="..." /> * If no layout is defined, this returns NULL * This requires the current rendering context in order to be able to evaluate the layout name * * @param RenderingContextInterface $renderingContext * @return string * @throws View\Exception */ public function getLayoutName(RenderingContextInterface $renderingContext) { return $this->variableContainer->get('layoutName'); }