You are here

function imageapi_get_available_toolkits in ImageAPI 6

Same name and namespace in other branches
  1. 5 imageapi.module \imageapi_get_available_toolkits()

Return a list of available toolkits.

Return value

An array of the enabled image toolkit modules. The module name is the key and the value is a sub-array with the module's 'name' and 'description'.

4 calls to imageapi_get_available_toolkits()
imageapi_default_toolkit in ./imageapi.module
Retrieve the name of the currently used toolkit.
imageapi_menu in ./imageapi.module
Implementation of hook_menu().
imageapi_requirements in ./imageapi.install
Implementation of hook_requirements().
imageapi_settings in ./imageapi.module

File

./imageapi.module, line 114
An ImageAPI supporting additional image plugins as modules. Images are treated as objects, and images are not written per manipulation as Drupal's core image handling works.

Code

function imageapi_get_available_toolkits() {
  static $toolkits;
  if (!isset($toolkits)) {
    $toolkits = array();
    foreach (module_implements('imageapi_toolkit', TRUE) as $module) {
      $info = drupal_parse_info_file(drupal_get_path('module', $module) . '/' . $module . '.info');
      $toolkits[$module] = array(
        'name' => $info['name'],
        'description' => $info['description'],
      );
    }
  }
  return $toolkits;
}