Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CreateNew.php

function 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,
        ],
    ];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal