/** * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext * @return boolean the boolean value */ public function evaluate(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext) { if ($this->comparator !== NULL) { return self::evaluateComparator($this->comparator, $this->leftSide->evaluate($renderingContext), $this->rightSide->evaluate($renderingContext)); } else { $value = $this->syntaxTreeNode->evaluate($renderingContext); return self::convertToBoolean($value); } }
/** * 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 \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext * @return string * @throws \TYPO3\CMS\Fluid\View\Exception */ public function getLayoutName(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext) { if (!$this->hasLayout()) { return NULL; } $layoutName = $this->layoutNameNode->evaluate($renderingContext); if (!empty($layoutName)) { return $layoutName; } throw new \TYPO3\CMS\Fluid\View\Exception('The layoutName could not be evaluated to a string', 1296805368); }