function ImageToolkitManager::getAvailableToolkits
Same name in other branches
- 9 core/lib/Drupal/Core/ImageToolkit/ImageToolkitManager.php \Drupal\Core\ImageToolkit\ImageToolkitManager::getAvailableToolkits()
- 10 core/lib/Drupal/Core/ImageToolkit/ImageToolkitManager.php \Drupal\Core\ImageToolkit\ImageToolkitManager::getAvailableToolkits()
- 11.x core/lib/Drupal/Core/ImageToolkit/ImageToolkitManager.php \Drupal\Core\ImageToolkit\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::getDefaultToolkitId in core/
lib/ Drupal/ Core/ ImageToolkit/ ImageToolkitManager.php - Gets the default image toolkit ID.
File
-
core/
lib/ Drupal/ Core/ ImageToolkit/ ImageToolkitManager.php, line 86
Class
- ImageToolkitManager
- Manages image toolkit plugins.
Namespace
Drupal\Core\ImageToolkitCode
public function getAvailableToolkits() {
// Use plugin system to get list of available toolkits.
$toolkits = $this->getDefinitions();
$output = [];
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.