function image_get_available_toolkits
7.x image.inc | image_get_available_toolkits() |
6.x image.inc | image_get_available_toolkits() |
Gets a list of available toolkits.
Return value
An array with the toolkit names as keys and the descriptions as values.
Related topics
3 calls to image_get_available_toolkits()
- ImageToolkitUnitTest::testGetAvailableToolkits in drupal-7.x/
modules/ simpletest/ tests/ image.test - Check that hook_image_toolkits() is called and only available toolkits are returned.
- image_get_toolkit in drupal-7.x/
includes/ image.inc - Gets the name of the currently used toolkit.
- system_image_toolkit_settings in drupal-7.x/
modules/ system/ system.admin.inc - Form builder; Configure site image toolkit usage.
File
- drupal-7.x/
includes/ image.inc, line 42 - API for manipulating images.
Code
function image_get_available_toolkits() {
// hook_image_toolkits returns an array of toolkit names.
$toolkits = module_invoke_all('image_toolkits');
$output = array();
foreach ($toolkits as $name => $info) {
// Only allow modules that aren't marked as unavailable.
if ($info['available']) {
$output[$name] = $info['title'];
}
}
return $output;
}