TYPO3  7.6
Public Member Functions | Protected Attributes | List of all members
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 (   $name,
  $dataType 
)

Constructs this controller argument

Parameters
string$nameName of this argument
string$dataTypeThe data type of this argument
Exceptions
\InvalidArgumentExceptionif $name is not a string or empty

Definition at line 117 of file Argument.php.

References Argument\$dataType, Argument\$name, and TypeHandlingUtility\normalizeType().

Member Function Documentation

__toString ( )

Returns a string representation of this argument's value

Returns
string

Definition at line 336 of file Argument.php.

References Argument\$value.

getDataType ( )

Returns the data type of this argument's value

Returns
string The data type

Definition at line 174 of file Argument.php.

References Argument\$dataType.

getDefaultValue ( )

Returns the default value of this argument

Returns
mixed The default value

Definition at line 222 of file Argument.php.

References Argument\$defaultValue.

getName ( )

Returns the name of this argument

Returns
string This argument's name

Definition at line 135 of file Argument.php.

References Argument\$name.

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 Argument\$propertyMappingConfiguration.

getShortName ( )

Returns the short name of this argument

Returns
string This argument's short name

Definition at line 163 of file Argument.php.

References Argument\$shortName.

getValidationResults ( )
Returns
Validation errors which have occurred.

Definition at line 325 of file Argument.php.

References Argument\$validationResults.

getValidator ( )

Returns the set validator

Returns
The set validator, NULL if none was set

Definition at line 246 of file Argument.php.

References Argument\$validator.

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 Argument\$defaultValue, and Argument\$value.

injectPropertyMapper ( \TYPO3\CMS\Extbase\Property\PropertyMapper  $propertyMapper)
Parameters
\TYPO3\CMS\Extbase\Property\PropertyMapper$propertyMapper

Definition at line 96 of file Argument.php.

References Argument\$propertyMapper.

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

Definition at line 104 of file Argument.php.

References Argument\$propertyMappingConfiguration.

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 Argument\$isRequired.

Referenced by Argument\setRequired(), and Argument\setValue().

isValid ( )
Returns
bool TRUE if the argument is valid, FALSE otherwise

Definition at line 316 of file Argument.php.

setDefaultValue (   $defaultValue)

Sets the default value of the argument

Parameters
mixed$defaultValueDefault value
Returns
$this

Definition at line 210 of file Argument.php.

References Argument\$defaultValue.

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 Argument\isRequired().

setShortName (   $shortName)

Sets the short name of this argument.

Parameters
string$shortNameA "short name" - a single character
Exceptions
\InvalidArgumentExceptionif $shortName is not a character
Returns
$this

Definition at line 148 of file Argument.php.

References Argument\$shortName.

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 Argument\$validator.

setValue (   $rawValue)

Sets the value of this argument.

Parameters
mixed$rawValueThe value of this argument
Returns
Exceptions
\TYPO3\CMS\Extbase\Property\Exception

Definition at line 259 of file Argument.php.

References Argument\isRequired().

Member Data Documentation

$dataType = null
protected

Definition at line 56 of file Argument.php.

Referenced by Argument\__construct(), and Argument\getDataType().

$defaultValue = null
protected
$isRequired = false
protected

Definition at line 63 of file Argument.php.

Referenced by Argument\isRequired().

$name = ''
protected

Definition at line 42 of file Argument.php.

Referenced by Argument\__construct(), and Argument\getName().

$propertyMapper
protected

Definition at line 30 of file Argument.php.

Referenced by Argument\injectPropertyMapper().

$propertyMappingConfiguration
protected
$shortName = null
protected

Definition at line 49 of file Argument.php.

Referenced by Argument\getShortName(), and Argument\setShortName().

$validationResults = null
protected

Definition at line 91 of file Argument.php.

Referenced by Argument\getValidationResults().

$validator = null
protected

Definition at line 84 of file Argument.php.

Referenced by Argument\getValidator(), and Argument\setValidator().

$value = null
protected

Definition at line 70 of file Argument.php.

Referenced by Argument\__toString(), and Argument\getValue().