function CreateNew::arguments

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

File

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

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 caller is responsible for destroying the original GD resource.',
      'required' => FALSE,
      'default' => FALSE,
    ],
  ];
}

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