You are here

protected function ScaleAndSmartCropTrait::arguments in Image Effects 8.2

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

File

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

Class

ScaleAndSmartCropTrait
Base trait for Scale and 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' => 'The target width, in pixels',
      'required' => TRUE,
    ],
    'height' => [
      'description' => 'The target height, in pixels',
      'required' => TRUE,
    ],
    'upscale' => [
      'description' => 'Boolean indicating that files smaller than the dimensions will be scaled up. This generally results in a low quality image',
      'required' => FALSE,
      'default' => FALSE,
    ],
  ];
}