ImageFactory::getSupportedExtensions

public ImageFactory::getSupportedExtensions($toolkit_id = NULL)

Returns the image file extensions supported by the toolkit.

Parameters

string|null $toolkit_id: (optional) The ID of the image toolkit to use for checking, or NULL to use the current toolkit.

Return value

array An array of supported image file extensions (e.g. png/jpeg/gif).

See also

\Drupal\Core\ImageToolkit\ImageToolkitInterface::getSupportedExtensions()

File

core/lib/Drupal/Core/Image/ImageFactory.php, line 100

Class

ImageFactory
Provides a factory for image objects.

Namespace

Drupal\Core\Image

Code

public function getSupportedExtensions($toolkit_id = NULL) {
  $toolkit_id = $toolkit_id ? : $this->toolkitId;
  $definition = $this->toolkitManager->getDefinition($toolkit_id);
  return call_user_func($definition['class'] . '::getSupportedExtensions');
}
doc_Drupal
2016-10-29 09:19:20
Comments
Leave a Comment

Please login to continue.