You are here

function rolereference_token_list in Role Reference 6

CCK field Token API hook_token_list implimentation

Parameters

string type The type of tokens to list.:

Return value

array An array of token-type => token-name => description

See also

content.token.inc and http://drupal.org/node/156860

File

./rolereference.module, line 895
Defines a field type for referencing a role. Based almost entirely on nodereference and userreference modules.

Code

function rolereference_token_list($type = 'all') {
  if ($type == 'field' || $type == 'all') {
    $tokens = array();
    $tokens['role referenced']['rid'] = t('The first / single referenced role ID');
    $tokens['role referenced']['role'] = t('The first / single referenced role name');
    $tokens['role referenced']['rid-all'] = t('All referenced rids.');
    $tokens['role referenced']['role-all'] = t('All referenced role names.');
    return $tokens;
  }
}