‪TYPO3CMS  9.5
TYPO3\CMS\Extbase\Mvc\Controller\Argument Class Reference

Public Member Functions

 injectPropertyMapper (\TYPO3\CMS\Extbase\Property\PropertyMapper $propertyMapper)
 
 injectPropertyMappingConfiguration (MvcPropertyMappingConfiguration $propertyMappingConfiguration)
 
 __construct ($name, $dataType)
 
string getName ()
 
TYPO3 CMS Extbase Mvc Controller Argument setShortName ($shortName)
 
string getShortName ()
 
string getDataType ()
 
TYPO3 CMS Extbase Mvc Controller Argument setRequired ($required)
 
bool isRequired ()
 
TYPO3 CMS Extbase Mvc Controller Argument setDefaultValue ($defaultValue)
 
mixed getDefaultValue ()
 
TYPO3 CMS Extbase Mvc Controller Argument setValidator (\TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface $validator)
 
TYPO3 CMS Extbase Validation Validator ValidatorInterface getValidator ()
 
TYPO3 CMS Extbase Mvc Controller Argument setValue ($rawValue)
 
mixed getValue ()
 
TYPO3 CMS Extbase Mvc Controller MvcPropertyMappingConfiguration getPropertyMappingConfiguration ()
 
bool isValid ()
 
TYPO3 CMS Extbase Error Result getValidationResults ()
 
string __toString ()
 
TYPO3 CMS Extbase Error Result validate ()
 

Protected Attributes

TYPO3 CMS Extbase Property PropertyMapper $propertyMapper
 
MvcPropertyMappingConfiguration $propertyMappingConfiguration
 
string $name = ''
 
string $shortName
 
string $dataType
 
bool $isRequired = false
 
mixed $value
 
mixed $defaultValue
 
TYPO3 CMS Extbase Validation Validator ValidatorInterface $validator
 
TYPO3 CMS Extbase Error Result $validationResults
 

Private Attributes

bool $hasBeenValidated = false
 

Detailed Description

A controller argument

Definition at line 24 of file Argument.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Extbase\Mvc\Controller\Argument::__construct (   $name,
  $dataType 
)

Constructs this controller argument

Parameters
string$name‪Name of this argument
string$dataType‪The data type of this argument
Exceptions

Definition at line 109 of file Argument.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Argument\$dataType, TYPO3\CMS\Extbase\Mvc\Controller\Argument\$name, and TYPO3\CMS\Extbase\Utility\TypeHandlingUtility\normalizeType().

Member Function Documentation

◆ __toString()

string TYPO3\CMS\Extbase\Mvc\Controller\Argument::__toString ( )

Returns a string representation of this argument's value

Returns
‪string

Definition at line 315 of file Argument.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Argument\$value.

◆ getDataType()

string TYPO3\CMS\Extbase\Mvc\Controller\Argument::getDataType ( )

Returns the data type of this argument's value

Returns
‪string The data type

Definition at line 164 of file Argument.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Argument\$dataType.

◆ getDefaultValue()

mixed TYPO3\CMS\Extbase\Mvc\Controller\Argument::getDefaultValue ( )

Returns the default value of this argument

Returns
‪mixed The default value

Definition at line 208 of file Argument.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Argument\$defaultValue.

◆ getName()

string TYPO3\CMS\Extbase\Mvc\Controller\Argument::getName ( )

Returns the name of this argument

Returns
‪string This argument's name

Definition at line 128 of file Argument.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Argument\$name.

◆ getPropertyMappingConfiguration()

TYPO3 CMS Extbase Mvc Controller MvcPropertyMappingConfiguration TYPO3\CMS\Extbase\Mvc\Controller\Argument::getPropertyMappingConfiguration ( )

Return the Property Mapping Configuration used for this argument; can be used by the initialize*action to modify the Property Mapping.

Returns
‪\TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfiguration

Definition at line 283 of file Argument.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Argument\$propertyMappingConfiguration.

◆ getShortName()

string TYPO3\CMS\Extbase\Mvc\Controller\Argument::getShortName ( )

Returns the short name of this argument

Returns
‪string This argument's short name

Definition at line 154 of file Argument.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Argument\$shortName.

◆ getValidationResults()

TYPO3 CMS Extbase Error Result TYPO3\CMS\Extbase\Mvc\Controller\Argument::getValidationResults ( )
Returns
‪\TYPO3\CMS\Extbase\Error\Result Validation errors which have occurred.
Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0.

Definition at line 300 of file Argument.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Argument\validate().

◆ getValidator()

TYPO3 CMS Extbase Validation Validator ValidatorInterface TYPO3\CMS\Extbase\Mvc\Controller\Argument::getValidator ( )

Returns the set validator

Returns
‪\TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface The set validator, NULL if none was set

Definition at line 230 of file Argument.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Argument\$validator.

◆ getValue()

mixed TYPO3\CMS\Extbase\Mvc\Controller\Argument::getValue ( )

Returns the value of this argument

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

Definition at line 270 of file Argument.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Argument\$defaultValue, and TYPO3\CMS\Extbase\Mvc\Controller\Argument\$value.

◆ injectPropertyMapper()

TYPO3\CMS\Extbase\Mvc\Controller\Argument::injectPropertyMapper ( \TYPO3\CMS\Extbase\Property\PropertyMapper  $propertyMapper)
Parameters
\TYPO3\CMS\Extbase\Property\PropertyMapper$propertyMapper

Definition at line 89 of file Argument.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Argument\$propertyMapper.

◆ injectPropertyMappingConfiguration()

TYPO3\CMS\Extbase\Mvc\Controller\Argument::injectPropertyMappingConfiguration ( MvcPropertyMappingConfiguration  $propertyMappingConfiguration)
Parameters
\TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfiguration$propertyMappingConfiguration

Definition at line 97 of file Argument.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Argument\$propertyMappingConfiguration.

◆ isRequired()

bool TYPO3\CMS\Extbase\Mvc\Controller\Argument::isRequired ( )

Returns TRUE if this argument is required

Returns
‪bool TRUE if this argument is required

Definition at line 186 of file Argument.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Argument\$isRequired.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\Argument\setRequired(), and TYPO3\CMS\Extbase\Mvc\Controller\Argument\setValue().

◆ isValid()

bool TYPO3\CMS\Extbase\Mvc\Controller\Argument::isValid ( )
Returns
‪bool TRUE if the argument is valid, FALSE otherwise

Definition at line 291 of file Argument.php.

References TYPO3\CMS\Extbase\Error\Result\hasErrors(), and TYPO3\CMS\Extbase\Mvc\Controller\Argument\validate().

◆ setDefaultValue()

TYPO3 CMS Extbase Mvc Controller Argument TYPO3\CMS\Extbase\Mvc\Controller\Argument::setDefaultValue (   $defaultValue)

Sets the default value of the argument

Parameters
mixed$defaultValue‪Default value
Returns
‪\TYPO3\CMS\Extbase\Mvc\Controller\Argument $this

Definition at line 197 of file Argument.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Argument\$defaultValue.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\Arguments\addNewArgument().

◆ setRequired()

TYPO3 CMS Extbase Mvc Controller Argument TYPO3\CMS\Extbase\Mvc\Controller\Argument::setRequired (   $required)

Marks this argument to be required

Parameters
bool$required‪TRUE if this argument should be required
Returns
‪\TYPO3\CMS\Extbase\Mvc\Controller\Argument $this

Definition at line 175 of file Argument.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Argument\isRequired().

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\Arguments\addNewArgument().

◆ setShortName()

TYPO3 CMS Extbase Mvc Controller Argument TYPO3\CMS\Extbase\Mvc\Controller\Argument::setShortName (   $shortName)

Sets the short name of this argument.

Parameters
string$shortName‪A "short name" - a single character
Exceptions

Definition at line 140 of file Argument.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Argument\$shortName.

◆ setValidator()

TYPO3 CMS Extbase Mvc Controller Argument TYPO3\CMS\Extbase\Mvc\Controller\Argument::setValidator ( \TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface  $validator)

Sets a custom validator which is used supplementary to the base validation

Parameters
\TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface$validator‪The actual validator object
Returns
‪\TYPO3\CMS\Extbase\Mvc\Controller\Argument Returns $this (used for fluent interface)

Definition at line 219 of file Argument.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Argument\$validator.

◆ setValue()

TYPO3 CMS Extbase Mvc Controller Argument TYPO3\CMS\Extbase\Mvc\Controller\Argument::setValue (   $rawValue)

Sets the value of this argument.

Parameters
mixed$rawValue‪The value of this argument
Returns
‪\TYPO3\CMS\Extbase\Mvc\Controller\Argument
Exceptions

Definition at line 243 of file Argument.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Argument\isRequired().

◆ validate()

TYPO3 CMS Extbase Error Result TYPO3\CMS\Extbase\Mvc\Controller\Argument::validate ( )

Member Data Documentation

◆ $dataType

string TYPO3\CMS\Extbase\Mvc\Controller\Argument::$dataType
protected

Data type of this argument's value

Definition at line 50 of file Argument.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\Argument\__construct(), and TYPO3\CMS\Extbase\Mvc\Controller\Argument\getDataType().

◆ $defaultValue

mixed TYPO3\CMS\Extbase\Mvc\Controller\Argument::$defaultValue
protected

◆ $hasBeenValidated

bool TYPO3\CMS\Extbase\Mvc\Controller\Argument::$hasBeenValidated = false
private

Definition at line 84 of file Argument.php.

◆ $isRequired

bool TYPO3\CMS\Extbase\Mvc\Controller\Argument::$isRequired = false
protected

TRUE if this argument is required

Definition at line 56 of file Argument.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\Argument\isRequired().

◆ $name

string TYPO3\CMS\Extbase\Mvc\Controller\Argument::$name = ''
protected

◆ $propertyMapper

TYPO3 CMS Extbase Property PropertyMapper TYPO3\CMS\Extbase\Mvc\Controller\Argument::$propertyMapper
protected

◆ $propertyMappingConfiguration

MvcPropertyMappingConfiguration TYPO3\CMS\Extbase\Mvc\Controller\Argument::$propertyMappingConfiguration
protected

◆ $shortName

string TYPO3\CMS\Extbase\Mvc\Controller\Argument::$shortName
protected

◆ $validationResults

TYPO3 CMS Extbase Error Result TYPO3\CMS\Extbase\Mvc\Controller\Argument::$validationResults
protected

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

Definition at line 80 of file Argument.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\Argument\validate().

◆ $validator

TYPO3 CMS Extbase Validation Validator ValidatorInterface TYPO3\CMS\Extbase\Mvc\Controller\Argument::$validator
protected

A custom validator, used supplementary to the base validation

Definition at line 74 of file Argument.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\Argument\getValidator(), and TYPO3\CMS\Extbase\Mvc\Controller\Argument\setValidator().

◆ $value

mixed TYPO3\CMS\Extbase\Mvc\Controller\Argument::$value
protected

Actual value of this argument

Definition at line 62 of file Argument.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\Argument\__toString(), and TYPO3\CMS\Extbase\Mvc\Controller\Argument\getValue().