function Scale::arguments

Same name and namespace in other branches
  1. 9 core/modules/system/src/Plugin/ImageToolkit/Operation/gd/Scale.php \Drupal\system\Plugin\ImageToolkit\Operation\gd\Scale::arguments()
  2. 8.9.x core/modules/system/src/Plugin/ImageToolkit/Operation/gd/Scale.php \Drupal\system\Plugin\ImageToolkit\Operation\gd\Scale::arguments()
  3. 11.x core/modules/system/src/Plugin/ImageToolkit/Operation/gd/Scale.php \Drupal\system\Plugin\ImageToolkit\Operation\gd\Scale::arguments()

Overrides Resize::arguments

File

core/modules/system/src/Plugin/ImageToolkit/Operation/gd/Scale.php, line 23

Class

Scale
Defines GD2 Scale operation.

Namespace

Drupal\system\Plugin\ImageToolkit\Operation\gd

Code

protected function arguments() {
    return [
        'width' => [
            'description' => 'The target width, in pixels. This value is omitted then the scaling will based only on the height value',
            'required' => FALSE,
            'default' => NULL,
        ],
        'height' => [
            'description' => 'The target height, in pixels. This value is omitted then the scaling will based only on the width value',
            'required' => FALSE,
            'default' => NULL,
        ],
        '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,
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.