You are here

protected function SmartCropTrait::arguments in Image Effects 8.3

Same name and namespace in other branches
  1. 8 src/Plugin/ImageToolkit/Operation/SmartCropTrait.php \Drupal\image_effects\Plugin\ImageToolkit\Operation\SmartCropTrait::arguments()
  2. 8.2 src/Plugin/ImageToolkit/Operation/SmartCropTrait.php \Drupal\image_effects\Plugin\ImageToolkit\Operation\SmartCropTrait::arguments()

File

src/Plugin/ImageToolkit/Operation/SmartCropTrait.php, line 13

Class

SmartCropTrait
Base trait for Smart Crop operations.

Namespace

Drupal\image_effects\Plugin\ImageToolkit\Operation

Code

protected function arguments() {
  return [
    'algorithm' => [
      'description' => 'The calculation algorithm for the crop',
      'required' => TRUE,
    ],
    'algorithm_params' => [
      'description' => 'The calculation algorithm parameters',
      'required' => FALSE,
      'default' => [],
    ],
    'simulate' => [
      'description' => 'Boolean indicating the crop shall not be executed, but just the crop area highlighted on the source image',
      'required' => FALSE,
      'default' => FALSE,
    ],
    'width' => [
      'description' => 'An integer representing the desired width in pixels',
      'required' => TRUE,
    ],
    'height' => [
      'description' => 'An integer representing the desired height in pixels',
      'required' => TRUE,
    ],
  ];
}