You are here

function hook_api_tokens_info_alter in API Tokens 8

Same name and namespace in other branches
  1. 8.2 api_tokens.api.php \hook_api_tokens_info_alter()
  2. 7 api_tokens.api.php \hook_api_tokens_info_alter()

Alter the API token plugin definitions.

Parameters

array &$info: An array of all API token plugin definitions (empty array if no definitions were found). Keys are plugin IDs.

Related topics

1 invocation of hook_api_tokens_info_alter()
ApiTokenManager::__construct in src/ApiTokenManager.php
Constructs an ApiTokenManager object.

File

./api_tokens.api.php, line 45
Hooks provided by the API Tokens module.

Code

function hook_api_tokens_info_alter(array &$info) {

  // Alters the description of the "some" API token.
  if (isset($info['some'])) {
    $info['some']['description'] = t('Some API token description.');
  }
}