PHP Neos\FluidAdaptor\Core\ViewHelper AbstractConditionViewHelper - 1개의 예제가 발견되었습니다. 이것들은 오픈소스 프로젝트에서 추출된 PHP의 Neos\FluidAdaptor\Core\ViewHelper\AbstractConditionViewHelper에 대한 실세계 최고 등급의 예제들입니다. 예제들을 평가하여 예제의 품질 향상에 도움을 줄 수 있습니다.
또한 보기:
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.
또한 보기:
Neos\FluidAdaptor\ViewHelpers\IfViewHelper for a more detailed explanation and a simple usage example.
Make sure to NOT OVERRIDE the constructor.