You are here

function workbench_access_token_info in Workbench Access 7

Same name and namespace in other branches
  1. 8 workbench_access.module \workbench_access_token_info()

Implements hook_token_info().

File

./workbench_access.tokens.inc, line 11
Token integration for the workbench_access module.

Code

function workbench_access_token_info() {

  // Node tokens.
  $info['tokens']['node']['workbench-access-sections'] = array(
    'name' => t('Workbench access sections'),
    'description' => t('Section assignments for the node.'),
    'type' => 'array',
  );

  // User tokens.
  $info['tokens']['user']['workbench-access-sections'] = array(
    'name' => t('Workbench access sections'),
    'description' => t('Section assignments for the user account.'),
    'type' => 'array',
  );

  // Site global tokens.
  $info['tokens']['site']['workbench-access-scheme'] = array(
    'name' => t('Workbench access scheme'),
    'description' => t('The active access scheme used on the site.'),
    'type' => 'workbench-access-scheme',
  );

  // Workbench access scheme tokens.
  $info['types']['workbench-access-scheme'] = array(
    'name' => t('Workbench access scheme'),
    'description' => t('Tokens related to workbench access schemes.'),
    'needs-data' => 'workbench-access-scheme',
  );
  $info['tokens']['workbench-access-scheme']['name'] = array(
    'name' => t('Name'),
    'description' => t('The name of the access scheme.'),
  );
  $info['tokens']['workbench-access-scheme']['machine-name'] = array(
    'name' => t('Machine name'),
    'description' => t('The unique machine-readable name of the access scheme.'),
  );
  $info['tokens']['workbench-access-scheme']['description'] = array(
    'name' => t('Description'),
    'description' => t('A human-readable description of the access control scheme.'),
  );
  return $info;
}