Patched to Drupal 8.4.8 level. See https://www.drupal.org/sa-core-2018-004 and patch...
[yaffs-website] / web / core / lib / Drupal / Core / ImageToolkit / ImageToolkitOperationInterface.php
1 <?php
2
3 namespace Drupal\Core\ImageToolkit;
4
5 use Drupal\Component\Plugin\PluginInspectionInterface;
6
7 /**
8  * Defines an interface for image toolkit operations.
9  *
10  * An image toolkit operation plugin provides a self-contained image
11  * manipulation routine, for a specific image toolkit. Examples of image
12  * toolkit operations are scaling, cropping, rotating, etc.
13  *
14  * @see \Drupal\Core\ImageToolkit\Annotation\ImageToolkitOperation
15  * @see \Drupal\Core\ImageToolkit\ImageToolkitOperationBase
16  * @see \Drupal\Core\ImageToolkit\ImageToolkitOperationManager
17  * @see plugin_api
18  */
19 interface ImageToolkitOperationInterface extends PluginInspectionInterface {
20
21   /**
22    * Applies a toolkit specific operation to an image.
23    *
24    * @param array $arguments
25    *   An associative array of data to be used by the toolkit operation.
26    *
27    * @return bool
28    *   TRUE if the operation was performed successfully, FALSE otherwise.
29    *
30    * @throws \InvalidArgumentException
31    *   If one or more of the arguments are not valid.
32    */
33   public function apply(array $arguments);
34
35 }