function 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 modules/
simpletest/ tests/ image.test - Check that hook_image_toolkits() is called and only available toolkits are returned.
- image_get_toolkit in includes/
image.inc - Gets the name of the currently used toolkit.
- system_image_toolkit_settings in modules/
system/ system.admin.inc - Form builder; Configure site image toolkit usage.
File
-
includes/
image.inc, line 42
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.