class ImageSizeValidator extends AbstractValidator (View source)

Validator that checks size (resolution) of a given image

Example: [at]Flow\Validate("$image", type="\Neos\Media\Validator\ImageSizeValidator", options={ "minimumWidth"=150, "maximumResolution"=60000 })

Properties

protected array $supportedOptions

Methods

void
isValid(ImageInterface $image)

The given $value is valid if it is an \Neos\Media\Domain\Model\ImageInterface of the configured resolution Note: a value of NULL or empty string ('') is considered valid

void
validateOptions()

No description

Details

protected void isValid(ImageInterface $image)

The given $value is valid if it is an \Neos\Media\Domain\Model\ImageInterface of the configured resolution Note: a value of NULL or empty string ('') is considered valid

Parameters

ImageInterface $image

The image that should be validated

Return Value

void

protected void validateOptions()

No description

Return Value

void

Exceptions

InvalidValidationOptionsException