PHP Class Neos\Flow\Mvc\Controller\Argument

Mostra file Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Property Type Description
$dataType string Data type of this argument's value
$defaultValue mixed Default value. Used if argument is optional.
$isRequired boolean TRUE if this argument is required
$name string Name of this argument
$propertyMapper Neos\Flow\Property\PropertyMapper
$propertyMappingConfiguration MvcPropertyMappingConfiguration
$validationResults Neos\Error\Messages\Result The validation results. This can be asked if the argument has errors.
$validator Neos\Flow\Validation\Validator\ValidatorInterface A custom validator, used supplementary to the base validation
$value object Actual value of this argument

Public Methods

Method Description
__construct ( string $name, string $dataType ) Constructs this controller argument
getDataType ( ) : string Returns the data type of this argument's value
getDefaultValue ( ) : mixed Returns the default value of this argument
getName ( ) : string Returns the name of this argument
getPropertyMappingConfiguration ( ) : MvcPropertyMappingConfiguration Return the Property Mapping Configuration used for this argument; can be used by the initialize*action to modify the Property Mapping.
getValidationResults ( ) : array
getValidator ( ) : Neos\Flow\Validation\Validator\ValidatorInterface Returns the set validator
getValue ( ) : object Returns the value of this argument. If the value is NULL, we use the defaultValue.
isRequired ( ) : boolean Returns TRUE if this argument is required
isValid ( ) : boolean
setDefaultValue ( mixed $defaultValue ) : Argument Sets the default value of the argument
setRequired ( boolean $required ) : Argument Marks this argument to be required
setValidator ( Neos\Flow\Validation\Validator\ValidatorInterface $validator ) : Argument Sets a custom validator which is used supplementary to the base validation
setValue ( mixed $rawValue ) : Argument Sets the value of this argument.

Method Details

__construct() public method

Constructs this controller argument
public __construct ( string $name, string $dataType )
$name string Name of this argument
$dataType string The data type of this argument

getDataType() public method

Returns the data type of this argument's value
public getDataType ( ) : string
return string The data type

getDefaultValue() public method

Returns the default value of this argument
public getDefaultValue ( ) : mixed
return mixed The default value

getName() public method

Returns the name of this argument
public getName ( ) : string
return string This argument's name

getPropertyMappingConfiguration() public method

Return the Property Mapping Configuration used for this argument; can be used by the initialize*action to modify the Property Mapping.
public getPropertyMappingConfiguration ( ) : MvcPropertyMappingConfiguration
return MvcPropertyMappingConfiguration

getValidationResults() public method

public getValidationResults ( ) : array
return array

getValidator() public method

Returns the set validator
public getValidator ( ) : Neos\Flow\Validation\Validator\ValidatorInterface
return Neos\Flow\Validation\Validator\ValidatorInterface The set validator, NULL if none was set

getValue() public method

Returns the value of this argument. If the value is NULL, we use the defaultValue.
public getValue ( ) : object
return object The value of this argument - if none was set, the default value is returned

isRequired() public method

Returns TRUE if this argument is required
public isRequired ( ) : boolean
return boolean TRUE if this argument is required

isValid() public method

Deprecation: Will be removed for next major Flow version.
public isValid ( ) : boolean
return boolean TRUE if the argument is valid, FALSE otherwise

setDefaultValue() public method

Sets the default value of the argument
public setDefaultValue ( mixed $defaultValue ) : Argument
$defaultValue mixed Default value
return Argument $this

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

setValidator() public method

Sets a custom validator which is used supplementary to the base validation
public setValidator ( Neos\Flow\Validation\Validator\ValidatorInterface $validator ) : Argument
$validator Neos\Flow\Validation\Validator\ValidatorInterface The actual validator object
return Argument Returns $this (used for fluent interface)

setValue() public method

Sets the value of this argument.
public setValue ( mixed $rawValue ) : Argument
$rawValue mixed The value of this argument
return Argument $this

Property Details

$dataType protected_oe property

Data type of this argument's value
protected string $dataType
return string

$defaultValue protected_oe property

Default value. Used if argument is optional.
protected mixed $defaultValue
return mixed

$isRequired protected_oe property

TRUE if this argument is required
protected bool $isRequired
return boolean

$name protected_oe property

Name of this argument
protected string $name
return string

$propertyMapper protected_oe property

protected PropertyMapper,Neos\Flow\Property $propertyMapper
return Neos\Flow\Property\PropertyMapper

$propertyMappingConfiguration protected_oe property

protected MvcPropertyMappingConfiguration,Neos\Flow\Mvc\Controller $propertyMappingConfiguration
return MvcPropertyMappingConfiguration

$validationResults protected_oe property

The validation results. This can be asked if the argument has errors.
protected Result,Neos\Error\Messages $validationResults
return Neos\Error\Messages\Result

$validator protected_oe property

A custom validator, used supplementary to the base validation
protected ValidatorInterface,Neos\Flow\Validation\Validator $validator
return Neos\Flow\Validation\Validator\ValidatorInterface

$value protected_oe property

Actual value of this argument
protected object $value
return object