PHP Class Neos\Media\Validator\ImageTypeValidator
Example:
[at]Flow\Validate("$image", type="\Neos\Media\Validator\ImageTypeValidator", options={ "allowedTypes"={"jpeg", "png"} })
Exibir arquivo
Open project: neos/neos-development-collection
Class Usage Examples
Protected Properties
Protected Methods
Method |
Description |
|
isValid ( Neos\Media\Domain\Model\ImageInterface $image ) : void |
The given $value is valid if it is an \Neos\Media\Domain\Model\ImageInterface of the
configured type (one of the image/* IANA media subtypes) |
|
validateOptions ( ) : void |
Checks if this validator is correctly configured |
|
Method Details
isValid()
protected method
Note: a value of NULL or empty string ('') is considered valid
protected isValid ( Neos\Media\Domain\Model\ImageInterface $image ) : void |
$image |
Neos\Media\Domain\Model\ImageInterface |
The image that should be validated |
return |
void |
|
validateOptions()
protected method
Checks if this validator is correctly configured
Property Details
$supportedOptions protected_oe property
protected array $supportedOptions |
return |
array |
|