You are here

protected static function TestToolkit::supportedTypes in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php \Drupal\image_test\Plugin\ImageToolkit\TestToolkit::supportedTypes()
  2. 9 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 252

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