PHP Class Neos\Media\Validator\ImageOrientationValidator

Supported validator options are (array)allowedOrientations with one or two out of 'square', 'landcape' or 'portrait'. *Example*:: [at]Flow\Validate("$image", type="\Neos\Media\Validator\ImageOrientationValidator", options={ "allowedOrientations"={"square", "landscape"} }) this would refuse an image that is in portrait orientation, but allow landscape and square ones.
Inheritance: extends Neos\Flow\Validation\Validator\AbstractValidator
Show file Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Property Type Description
$supportedOptions array

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 orientation (square, portrait and/or landscape) Note: a value of NULL or empty string ('') is considered valid
validateOptions ( ) : void

Method Details

isValid() protected method

The given $value is valid if it is an \Neos\Media\Domain\Model\ImageInterface of the configured orientation (square, portrait and/or landscape) 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

protected validateOptions ( ) : void
return void

Property Details

$supportedOptions protected property

protected array $supportedOptions
return array