TYPO3  7.6
Public Member Functions | Public Attributes | Protected Attributes | List of all members
FileAllowedTypesValidator Class Reference
Inheritance diagram for FileAllowedTypesValidator:
AbstractValidator AbstractValidator ValidatorInterface

Public Member Functions

 isValid ($value)
 
 substituteMarkers ($message)
 
- Public Member Functions inherited from AbstractValidator
 setRawArgument ($rawArgument)
 
 setFormUtility (FormUtility $formUtility)
 
 substituteMarkers ($message)
 
 getLocalLanguageLabel ($type= '')
 
 renderMessage ($message=null, $type=null, $messageType= 'message')
 
- Public Member Functions inherited from AbstractValidator
 __construct (array $options=array())
 
 validate ($value)
 
 getOptions ()
 

Public Attributes

const LOCALISATION_OBJECT_NAME = 'tx_form_system_validate_fileallowedtypes'
 
- Public Attributes inherited from AbstractValidator
const LOCALISATION_OBJECT_NAME = 'tx_form_system_validate'
 

Protected Attributes

 $supportedOptions
 
- Protected Attributes inherited from AbstractValidator
 $formUtility
 
 $rawArgument
 
 $supportedOptions
 
 $acceptsEmptyValues = false
 
- Protected Attributes inherited from AbstractValidator
 $acceptsEmptyValues = true
 
 $supportedOptions = array()
 
 $options = array()
 
 $result
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractValidator
 isValid ($value)
 
 addError ($message, $code, array $arguments=array(), $title= '')
 
 isEmpty ($value)
 
 translateErrorMessage ($translateKey, $extensionName, $arguments=array())
 

Detailed Description

Definition at line 19 of file FileAllowedTypesValidator.php.

Member Function Documentation

isValid (   $value)

Check if the file mime type is allowed.

The mime type is set in the propertymapper

See Also
TYPO3::convertFrom
Parameters
mixed$value
Returns
void

Definition at line 46 of file FileAllowedTypesValidator.php.

References AbstractValidator\addError(), AbstractValidator\renderMessage(), and GeneralUtility\trimExplode().

substituteMarkers (   $message)

Substitute makers in the message text Overrides the abstract

Parameters
string$messageMessage text with markers
Returns
string Message text with substituted markers

Definition at line 70 of file FileAllowedTypesValidator.php.

Member Data Documentation

$supportedOptions
protected
Initial value:
= array(
'element' => array('', 'The name of the element', 'string', true),
'errorMessage' => array('', 'The error message', 'array', true),
'types' => array('', 'The allowed file types', 'string', true),
)

Definition at line 24 of file FileAllowedTypesValidator.php.

const LOCALISATION_OBJECT_NAME = 'tx_form_system_validate_fileallowedtypes'

Definition at line 35 of file FileAllowedTypesValidator.php.