function imageapi_get_available_toolkits in ImageAPI 5
Same name and namespace in other branches
- 6 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  - imageapi_settings in ./
imageapi.module  
File
- ./
imageapi.module, line 110  - An ImageAPI supporting mulitple image toolkits. Image toolkits are implemented as modules. Images are objects, but have no methods
 
Code
function imageapi_get_available_toolkits() {
  static $toolkits;
  if (!isset($toolkits)) {
    $toolkits = array();
    foreach (module_implements('imageapi_toolkit', true) as $module) {
      $info = _module_parse_info_file(drupal_get_path('module', $module) . '/' . $module . '.info');
      $toolkits[$module] = array(
        'name' => $info['name'],
        'description' => $info['description'],
      );
    }
  }
  return $toolkits;
}