Argument

A controller argument

Table of Contents

Properties

$dataType  : string
Data type of this argument's value
$defaultValue  : mixed
Default value. Used if argument is optional.
$isRequired  : bool
TRUE if this argument is required
$name  : string
Name of this argument
$propertyMappingConfiguration  : MvcPropertyMappingConfiguration
$shortName  : string
Short name of this argument
$validationResults  : Result
The validation results. This can be asked if the argument has errors.
$validator  : ValidatorInterface
A custom validator, used supplementary to the base validation
$value  : mixed|null
Actual value of this argument

Methods

__construct()  : mixed
Constructs this controller argument
__toString()  : string
Returns a string representation of this argument's value
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.
getShortName()  : string
Returns the short name of this argument
getValidationResults()  : Result
getValidator()  : ValidatorInterface
Returns the set validator
getValue()  : mixed
Returns the value of this argument
isRequired()  : bool
Returns TRUE if this argument is required
isValid()  : bool
setDefaultValue()  : Argument
Sets the default value of the argument
setRequired()  : Argument
Marks this argument to be required
setShortName()  : Argument
Sets the short name of this argument.
setValidator()  : Argument
Sets a custom validator which is used supplementary to the base validation
setValue()  : Argument
Sets the value of this argument.
validate()  : Result

Properties

$dataType

Data type of this argument's value

protected string $dataType

$defaultValue

Default value. Used if argument is optional.

protected mixed $defaultValue

$isRequired

TRUE if this argument is required

protected bool $isRequired = false

$name

Name of this argument

protected string $name = ''

$shortName

Short name of this argument

protected string $shortName

$validationResults

The validation results. This can be asked if the argument has errors.

protected Result $validationResults

$value

Actual value of this argument

protected mixed|null $value

Methods

__construct()

Constructs this controller argument

public __construct(string $name, string $dataType) : mixed
Parameters
$name : string

Name of this argument

$dataType : string

The data type of this argument

Tags
throws
InvalidArgumentException

if $name is not a string or empty

__toString()

Returns a string representation of this argument's value

public __toString() : string
Return values
string

getDataType()

Returns the data type of this argument's value

public getDataType() : string
Return values
string

The data type

getDefaultValue()

Returns the default value of this argument

public getDefaultValue() : mixed
Return values
mixed

The default value

getName()

Returns the name of this argument

public getName() : string
Return values
string

This argument's name

getShortName()

Returns the short name of this argument

public getShortName() : string
Return values
string

This argument's short name

getValidationResults()

public getValidationResults() : Result
Internal

only to be used within Extbase, not part of TYPO3 Core API.

Return values
Result

getValue()

Returns the value of this argument

public getValue() : mixed
Return values
mixed

The value of this argument - if none was set, NULL is returned

isRequired()

Returns TRUE if this argument is required

public isRequired() : bool
Return values
bool

TRUE if this argument is required

isValid()

public isValid() : bool
Return values
bool

TRUE if the argument is valid, FALSE otherwise

setDefaultValue()

Sets the default value of the argument

public setDefaultValue(mixed $defaultValue) : Argument
Parameters
$defaultValue : mixed

Default value

Return values
Argument

$this

setRequired()

Marks this argument to be required

public setRequired(bool $required) : Argument
Parameters
$required : bool

TRUE if this argument should be required

Return values
Argument

$this

setShortName()

Sets the short name of this argument.

public setShortName(string $shortName) : Argument
Parameters
$shortName : string

A "short name" - a single character

Tags
throws
InvalidArgumentException

if $shortName is not a character

Return values
Argument

$this

setValue()

Sets the value of this argument.

public setValue(mixed $rawValue) : Argument
Parameters
$rawValue : mixed

The value of this argument

Return values
Argument

        
On this page

Search results