function CreateNew::arguments

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

Overrides ImageToolkitOperationBase::arguments

File

core/modules/system/src/Plugin/ImageToolkit/Operation/gd/CreateNew.php, line 24

Class

CreateNew
Defines GD2 create_new image operation.

Namespace

Drupal\system\Plugin\ImageToolkit\Operation\gd

Code

protected function arguments() {
    return [
        'width' => [
            'description' => 'The width of the image, in pixels',
        ],
        'height' => [
            'description' => 'The height of the image, in pixels',
        ],
        'extension' => [
            'description' => 'The extension of the image file (e.g. png, gif, etc.)',
            'required' => FALSE,
            'default' => 'png',
        ],
        'transparent_color' => [
            'description' => 'The RGB hex color for GIF transparency',
            'required' => FALSE,
            'default' => '#ffffff',
        ],
        'is_temp' => [
            'description' => 'If TRUE, this operation is being used to create a temporary image by another GD operation. After performing its function, the original GD object will be destroyed automatically.',
            'required' => FALSE,
            'default' => FALSE,
        ],
    ];
}

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