You are here

function hook_image_toolkits in Drupal 7

Define image toolkits provided by this module.

The file which includes each toolkit's functions must be included in this hook.

The toolkit's functions must be named image_toolkitname_operation(). where the operation may be:

Return value

An array with the toolkit name as keys and sub-arrays with these keys:

  • 'title': A string with the toolkit's title.
  • 'available': A Boolean value to indicate that the toolkit is operating properly, e.g. all required libraries exist.

See also

system_image_toolkits()

Related topics

2 functions implement hook_image_toolkits()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

image_test_image_toolkits in modules/simpletest/tests/image_test.module
Implements hook_image_toolkits().
system_image_toolkits in modules/system/system.module
Implements hook_image_toolkits().
1 invocation of hook_image_toolkits()
image_get_available_toolkits in includes/image.inc
Gets a list of available toolkits.

File

modules/system/system.api.php, line 1928
Hooks provided by Drupal core and the System module.

Code

function hook_image_toolkits() {
  return array(
    'working' => array(
      'title' => t('A toolkit that works.'),
      'available' => TRUE,
    ),
    'broken' => array(
      'title' => t('A toolkit that is "broken" and will not be listed.'),
      'available' => FALSE,
    ),
  );
}