public ImageToolkitManager::getAvailableToolkits()
Gets a list of available toolkits.
Return value
array An array with the toolkit names as keys and the descriptions as values.
File
- core/lib/Drupal/Core/ImageToolkit/ImageToolkitManager.php, line 86
Class
- ImageToolkitManager
- Manages image toolkit plugins.
Namespace
Drupal\Core\ImageToolkit
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 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 ; } |
Please login to continue.