public function ImageToolkitManager::getAvailableToolkits

Gets a list of available toolkits.

Return value

array An array with the toolkit names as keys and the descriptions as values.

1 call to ImageToolkitManager::getAvailableToolkits()
ImageToolkitManager::getDefaultToolkit in drupal/core/modules/system/lib/Drupal/system/Plugin/ImageToolkitManager.php
Gets the default image toolkit.

File

drupal/core/modules/system/lib/Drupal/system/Plugin/ImageToolkitManager.php, line 68
Contains \Drupal\system\Plugin\ImageToolkitManager.

Class

ImageToolkitManager
Manages toolkit plugins.

Namespace

Drupal\system\Plugin

Code

public function getAvailableToolkits() {

  // Use plugin system to get list of available toolkits.
  $toolkits = $this
    ->getDefinitions();
  $output = array();
  foreach ($toolkits as $id => $definition) {

    // Only allow modules that aren't marked as unavailable.
    if (call_user_func($definition['class'] . '::isAvailable')) {
      $output[$id] = $definition;
    }
  }
  return $output;
}