InterlaceTrait.php in Image Effects 8
File
src/Plugin/ImageToolkit/Operation/InterlaceTrait.php
View source
<?php
namespace Drupal\image_effects\Plugin\ImageToolkit\Operation;
trait InterlaceTrait {
protected function arguments() {
return [
'type' => [
'description' => 'The interlace type.',
'required' => FALSE,
'default' => 'Plane',
],
];
}
protected function validateArguments(array $arguments) {
if (!$arguments['type'] || !in_array($arguments['type'], [
'Line',
'Plane',
])) {
throw new \InvalidArgumentException("Invalid type '{$arguments['type']}' specified for the image 'interlace' operation");
}
return $arguments;
}
}