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.
$fileHandlingServiceConfiguration  : FileHandlingServiceConfiguration
Configuration for the file handling service
$isRequired  : bool
TRUE if this argument is required
$name  : string
Name of this argument
$propertyMappingConfiguration  : MvcPropertyMappingConfiguration
$shortName  : string
Short name of this argument
$uploadedFiles  : array<string, UploadedFileInterface|array<int, UploadedFileInterface>>
Uploaded files for the 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
getFileHandlingServiceConfiguration()  : FileHandlingServiceConfiguration
Return the FileHandlingServiceConfiguration used for this argument; can be used by the initialize*action to modify the file upload configuration for properties.
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
getUploadedFiles()  : array<string|int, mixed>
getUploadedFilesForProperty()  : array<int, UploadedFileInterface>
Returns an array of possible UploadedFile objects for the given property
getValidationResults()  : Result
getValidator()  : ValidatorInterface|null
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.
setUploadedFiles()  : void
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

$uploadedFiles

Uploaded files for the argument

protected array<string, UploadedFileInterface|array<int, UploadedFileInterface>> $uploadedFiles = []

$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

getUploadedFiles()

public getUploadedFiles() : array<string|int, mixed>
Return values
array<string|int, mixed>

getUploadedFilesForProperty()

Returns an array of possible UploadedFile objects for the given property

public getUploadedFilesForProperty(string $propertyName) : array<int, UploadedFileInterface>
Parameters
$propertyName : string
Return values
array<int, UploadedFileInterface>

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

setUploadedFiles()

public setUploadedFiles(array<string|int, mixed> $uploadedFiles) : void
Parameters
$uploadedFiles : array<string|int, mixed>

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