protected function ColorshiftTrait::validateArguments in Image Effects 8.2
Same name and namespace in other branches
- 8.3 src/Plugin/ImageToolkit/Operation/ColorshiftTrait.php \Drupal\image_effects\Plugin\ImageToolkit\Operation\ColorshiftTrait::validateArguments()
- 8 src/Plugin/ImageToolkit/Operation/ColorshiftTrait.php \Drupal\image_effects\Plugin\ImageToolkit\Operation\ColorshiftTrait::validateArguments()
File
- src/
Plugin/ ImageToolkit/ Operation/ ColorshiftTrait.php, line 26
Class
- ColorshiftTrait
- Base trait for image_effects Colorshift operations.
Namespace
Drupal\image_effects\Plugin\ImageToolkit\OperationCode
protected function validateArguments(array $arguments) {
// Assure color is a valid hex string.
if (!Color::validateHex($arguments['RGB'])) {
throw new \InvalidArgumentException("Invalid color ('{$arguments['RGB']}') specified for the image 'colorshift' operation");
}
return $arguments;
}