protected function CreateNew::arguments in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Plugin/ImageToolkit/Operation/gd/CreateNew.php \Drupal\system\Plugin\ImageToolkit\Operation\gd\CreateNew::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
- core/
modules/ system/ src/ Plugin/ ImageToolkit/ Operation/ gd/ CreateNew.php, line 28 - Contains \Drupal\system\Plugin\ImageToolkit\Operation\gd\CreateNew.
Class
- CreateNew
- Defines GD2 create_new image operation.
Namespace
Drupal\system\Plugin\ImageToolkit\Operation\gdCode
protected function arguments() {
return array(
'width' => array(
'description' => 'The width of the image, in pixels',
),
'height' => array(
'description' => 'The height of the image, in pixels',
),
'extension' => array(
'description' => 'The extension of the image file (e.g. png, gif, etc.)',
'required' => FALSE,
'default' => 'png',
),
'transparent_color' => array(
'description' => 'The RGB hex color for GIF transparency',
'required' => FALSE,
'default' => '#ffffff',
),
'is_temp' => array(
'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,
),
);
}