Neos\FluidAdaptor\Core\ViewHelper AbstractConditionViewHelper in PHP: 1 esempio trovato. Questo è il miglior esempio reale in PHP per Neos\FluidAdaptor\Core\ViewHelper\AbstractConditionViewHelper, estratto da progetti open source. Lo puoi valutare, per aiutarci a migliorare la qualità dei nostri esempi.
See also:
Neos\FluidAdaptor\Core\Parser\SyntaxTree\ViewHelperNode::convertArgumentValue() to find see how boolean arguments are evaluated
= Usage =
To create a custom Condition ViewHelper, you need to subclass this class, and
implement your own render() method. Inside there, you should call $this->renderThenChild()
if the condition evaluated to TRUE, and $this->renderElseChild() if the condition evaluated
to FALSE.
Every Condition ViewHelper has a "then" and "else" argument, so it can be used like:
<[aConditionViewHelperName] .... then="condition true" else="condition false" />,
or as well use the "then" and "else" child nodes.
See also:
Neos\FluidAdaptor\ViewHelpers\IfViewHelper for a more detailed explanation and a simple usage example.
Make sure to NOT OVERRIDE the constructor.