You are here

function hook_purl_provider in Persistent URL 7

Same name and namespace in other branches
  1. 6 purl.api.php \hook_purl_provider()

Registry hook for PURL providers. Should return a keyed array where each key is a provider identifier and each value is a sub-array of information for the the provider. Possible keys: "name": the human-readable name of the provider. Should be wrapped in t() if localization is desired. "description": description of the provider. Should be wrapped in t() if localization is desired. "callback": String. Callback function to be called when a modifier for this provider is found in a page request. "callback arguments": Optional. Array of arguments to supply to the callback function. Note that the modifier ID is always provided as the *last* argument to the callback function. "example": String. Example modifier to be displayed to administrators.

1 function implements hook_purl_provider()

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

purl_test_purl_provider in tests/purl_test.module
Implements hook_purl_provider().
1 invocation of hook_purl_provider()
purl_providers in ./purl.module
Invokes hook_purl_provider() to gather all providers.

File

./purl.api.php, line 23
Hooks provided by PURL.

Code

function hook_purl_provider() {
  return array(
    'example_provider' => array(
      'name' => t('Example provider'),
      'description' => t('Sets a message for the the retrieved ID.'),
      'callback' => 'drupal_set_message',
      'example' => 'foobar',
    ),
  );
}