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

Breadcrumb

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

function Convert::validateArguments

Overrides ImageToolkitOperationBase::validateArguments

File

core/modules/system/src/Plugin/ImageToolkit/Operation/gd/Convert.php, line 34

Class

Convert
Defines GD2 convert operation.

Namespace

Drupal\system\Plugin\ImageToolkit\Operation\gd

Code

protected function validateArguments(array $arguments) {
    if (!in_array($arguments['extension'], $this->getToolkit()
        ->getSupportedExtensions())) {
        throw new \InvalidArgumentException("Invalid extension ({$arguments['extension']}) specified for the image 'convert' operation");
    }
    return $arguments;
}

API Navigation

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