image_get_available_toolkits

Versions
4.6 – 7
image_get_available_toolkits()

Return a list of available toolkits.

Return value

An array with the toolkit names as keys and the descriptions as values.

Related topics

▾ 2 functions call image_get_available_toolkits()

image_get_toolkit in includes/image.inc
Retrieve the name of the currently used toolkit.
system_image_toolkit_settings in modules/system/system.admin.inc
Form builder; Configure site image toolkit usage.

Code

includes/image.inc, line 40

<?php
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;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.