Neos\Flow\Mvc\Controller\Argument::setRequired PHP Method

setRequired() public method

Marks this argument to be required
public setRequired ( boolean $required ) : Argument
$required boolean TRUE if this argument should be required
return Argument $this
    public function setRequired($required)
    {
        $this->isRequired = (bool) $required;
        return $this;
    }

Usage Example

Esempio n. 1
0
 /**
  * @test
  */
 public function setRequiredShouldProvideFluentInterfaceAndReallySetRequiredState()
 {
     $returnedArgument = $this->simpleValueArgument->setRequired(true);
     $this->assertSame($this->simpleValueArgument, $returnedArgument, 'The returned argument is not the original argument.');
     $this->assertTrue($this->simpleValueArgument->isRequired());
 }
All Usage Examples Of Neos\Flow\Mvc\Controller\Argument::setRequired