function TestToolkit::supportedTypes

Same name and namespace in other branches
  1. 9 core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php \Drupal\image_test\Plugin\ImageToolkit\TestToolkit::supportedTypes()
  2. 8.9.x core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php \Drupal\image_test\Plugin\ImageToolkit\TestToolkit::supportedTypes()
  3. 11.x core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php \Drupal\image_test\Plugin\ImageToolkit\TestToolkit::supportedTypes()

Returns a list of image types supported by the toolkit.

Return value

array An array of available image types. An image type is represented by a PHP IMAGETYPE_* constant (e.g. IMAGETYPE_JPEG, IMAGETYPE_PNG, etc.).

3 calls to TestToolkit::supportedTypes()
TestToolkit::getSupportedExtensions in core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php
Returns a list of image file extensions supported by the toolkit.
TestToolkit::parseFile in core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php
Determines if a file contains a valid image.
TestToolkit::setType in core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php
Sets the PHP type of the image.

File

core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php, line 253

Class

TestToolkit
Defines a Test toolkit for image manipulation within Drupal.

Namespace

Drupal\image_test\Plugin\ImageToolkit

Code

protected static function supportedTypes() {
    return [
        IMAGETYPE_PNG,
        IMAGETYPE_JPEG,
        IMAGETYPE_GIF,
    ];
}

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