You are here

function cas_attributes_token_info_alter in CAS Attributes 8

Same name and namespace in other branches
  1. 7 cas_attributes.tokens.inc \cas_attributes_token_info_alter()
  2. 2.x cas_attributes.tokens.inc \cas_attributes_token_info_alter()

Implements hook_token_info_alter().

File

./cas_attributes.tokens.inc, line 13
Token module integration.

Code

function cas_attributes_token_info_alter(&$data) {

  // Alter existing token definition provided by CAS to add the dynamic
  // attribute token.
  $data['tokens']['cas']['attribute'] = [
    'name' => t('Attribute'),
    'description' => t('A CAS attribute of the logged in user. Replace ? with the name of the attribute, in all lowercase. If the specified attribute has multiple values, they are combined into one string. You can specify which value you want using an array modifier (:first, :last, :count, etc). Requires the "Sitewide token support" feature of the CAS Attributes module.'),
    'dynamic' => TRUE,
  ];
}