См. также: 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.
Наследование: extends AbstractViewHelper
 /**
  * @test
  */
 public function elseArgumentHasPriorityOverChildNodesIfConditionIsFalse()
 {
     $mockElseViewHelperNode = $this->createMock(ViewHelperNode::class, array('getViewHelperClassName', 'evaluate', 'setRenderingContext'), [], '', false);
     $mockElseViewHelperNode->expects($this->any())->method('getViewHelperClassName')->will($this->returnValue(ElseViewHelper::class));
     $mockElseViewHelperNode->expects($this->never())->method('evaluate');
     $this->viewHelper->setChildNodes(array($mockElseViewHelperNode));
     $this->viewHelper->expects($this->atLeastOnce())->method('hasArgument')->with('else')->will($this->returnValue(true));
     $this->arguments['else'] = 'ElseArgument';
     $this->injectDependenciesIntoViewHelper($this->viewHelper);
     $actualResult = $this->viewHelper->_call('renderElseChild');
     $this->assertEquals('ElseArgument', $actualResult);
 }