TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Extbase\Mvc\Controller\Argument Class Reference

Public Member Functions

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

Protected Attributes

 $propertyMapper
 
 $propertyMappingConfiguration
 
 $name = ''
 
 $shortName = null
 
 $dataType = null
 
 $isRequired = false
 
 $value = null
 
 $defaultValue = null
 
 $validator = null
 
 $validationResults = null
 

Detailed Description

A controller argument

Definition at line 25 of file Argument.php.

Constructor & Destructor Documentation

◆ __construct()

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

Constructs this controller argument

Parameters
string$nameName of this argument
string$dataTypeThe data type of this argument
Exceptions

Definition at line 117 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()

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

Returns a string representation of this argument's value

Returns
string

Definition at line 336 of file Argument.php.

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

◆ getDataType()

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

Returns the data type of this argument's value

Returns
string The data type

Definition at line 174 of file Argument.php.

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

◆ getDefaultValue()

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

Returns the default value of this argument

Returns
mixed The default value

Definition at line 222 of file Argument.php.

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

◆ getName()

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

Returns the name of this argument

Returns
string This argument's name

Definition at line 135 of file Argument.php.

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

◆ getPropertyMappingConfiguration()

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

Definition at line 307 of file Argument.php.

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

◆ getShortName()

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

Returns the short name of this argument

Returns
string This argument's short name

Definition at line 163 of file Argument.php.

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

◆ getValidationResults()

TYPO3\CMS\Extbase\Mvc\Controller\Argument::getValidationResults ( )
Returns
Validation errors which have occurred.

Definition at line 325 of file Argument.php.

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

◆ getValidator()

TYPO3\CMS\Extbase\Mvc\Controller\Argument::getValidator ( )

Returns the set validator

Returns
The set validator, NULL if none was set

Definition at line 246 of file Argument.php.

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

◆ getValue()

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 292 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 96 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 104 of file Argument.php.

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

◆ isRequired()

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 198 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()

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

Definition at line 316 of file Argument.php.

◆ setDefaultValue()

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

Sets the default value of the argument

Parameters
mixed$defaultValueDefault value
Returns
$this

Definition at line 210 of file Argument.php.

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

◆ setRequired()

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

Marks this argument to be required

Parameters
bool$requiredTRUE if this argument should be required
Returns
$this

Definition at line 186 of file Argument.php.

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

◆ setShortName()

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

Sets the short name of this argument.

Parameters
string$shortNameA "short name" - a single character
Exceptions

Definition at line 148 of file Argument.php.

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

◆ setValidator()

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$validatorThe actual validator object
Returns
Returns $this (used for fluent interface)

Definition at line 234 of file Argument.php.

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

◆ setValue()

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

Sets the value of this argument.

Parameters
mixed$rawValueThe value of this argument
Returns
Exceptions

Definition at line 259 of file Argument.php.

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

Member Data Documentation

◆ $dataType

TYPO3\CMS\Extbase\Mvc\Controller\Argument::$dataType = null
protected

◆ $defaultValue

TYPO3\CMS\Extbase\Mvc\Controller\Argument::$defaultValue = null
protected

◆ $isRequired

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

Definition at line 63 of file Argument.php.

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

◆ $name

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

◆ $propertyMapper

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

◆ $propertyMappingConfiguration

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

◆ $shortName

TYPO3\CMS\Extbase\Mvc\Controller\Argument::$shortName = null
protected

◆ $validationResults

TYPO3\CMS\Extbase\Mvc\Controller\Argument::$validationResults = null
protected

◆ $validator

TYPO3\CMS\Extbase\Mvc\Controller\Argument::$validator = null
protected

◆ $value

TYPO3\CMS\Extbase\Mvc\Controller\Argument::$value = null
protected