function Convert::validateArguments
Same name in other branches
- 9 core/modules/system/src/Plugin/ImageToolkit/Operation/gd/Convert.php \Drupal\system\Plugin\ImageToolkit\Operation\gd\Convert::validateArguments()
- 10 core/modules/system/src/Plugin/ImageToolkit/Operation/gd/Convert.php \Drupal\system\Plugin\ImageToolkit\Operation\gd\Convert::validateArguments()
- 11.x core/modules/system/src/Plugin/ImageToolkit/Operation/gd/Convert.php \Drupal\system\Plugin\ImageToolkit\Operation\gd\Convert::validateArguments()
Overrides ImageToolkitOperationBase::validateArguments
File
-
core/
modules/ system/ src/ Plugin/ ImageToolkit/ Operation/ gd/ Convert.php, line 32
Class
- Convert
- Defines GD2 convert operation.
Namespace
Drupal\system\Plugin\ImageToolkit\Operation\gdCode
protected function validateArguments(array $arguments) {
if (!in_array($arguments['extension'], $this->getToolkit()
->getSupportedExtensions())) {
throw new \InvalidArgumentException("Invalid extension ({$arguments['extension']}) specified for the image 'convert' operation");
}
return $arguments;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.