Same name and namespace in other branches
  1. 4.6.x includes/image.inc \image_get_available_toolkits()
  2. 4.7.x includes/image.inc \image_get_available_toolkits()
  3. 5.x includes/image.inc \image_get_available_toolkits()
  4. 6.x includes/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 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
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;
}