You are here

protected function AdvanceResize::arguments in image effect 8

Same name in this branch
  1. 8 src/Plugin/ImageToolkit/Operation/gd/AdvanceResize.php \Drupal\image_effect\Plugin\ImageToolkit\Operation\gd\AdvanceResize::arguments()
  2. 8 src/Plugin/ImageToolkit/Operation/imagick/AdvanceResize.php \Drupal\image_effect\Plugin\ImageToolkit\Operation\imagick\AdvanceResize::arguments()
Same name and namespace in other branches
  1. 2.0.x src/Plugin/ImageToolkit/Operation/gd/AdvanceResize.php \Drupal\image_effect\Plugin\ImageToolkit\Operation\gd\AdvanceResize::arguments()
  2. 1.0.x src/Plugin/ImageToolkit/Operation/gd/AdvanceResize.php \Drupal\image_effect\Plugin\ImageToolkit\Operation\gd\AdvanceResize::arguments()

Returns the definition of the operation arguments.

Image toolkit operation implementers must implement this method to "document" their operation, thus also if no arguments are expected.

Return value

array An array whose keys are the names of the arguments (e.g. "width", "degrees") and each value is an associative array having the following keys:

  • description: A string with the argument description. This is used only internally for documentation purposes, so it does not need to be translatable.
  • required: (optional) A boolean indicating if this argument should be provided or not. Defaults to TRUE.
  • default: (optional) When the argument is set to "required" = FALSE, this must be set to a default value. Ignored for "required" = TRUE arguments.

Overrides ImageToolkitOperationBase::arguments

File

src/Plugin/ImageToolkit/Operation/gd/AdvanceResize.php, line 22

Class

AdvanceResize
Defines GD2 advance resize operation.

Namespace

Drupal\image_effect\Plugin\ImageToolkit\Operation\gd

Code

protected function arguments() {
  return [
    'width' => [
      'description' => 'The new width of the resized image, in pixels',
    ],
    'height' => [
      'description' => 'The new height of the resized image, in pixels',
    ],
  ];
}