You are here

function maestro_token_info in Maestro 3.x

Same name and namespace in other branches
  1. 8.2 maestro.module \maestro_token_info()

Implements hook_token_info().

File

./maestro.module, line 529
Provides glue logic, hook implementation and core set process variable functions.

Code

function maestro_token_info() {
  $type = [
    'name' => t('Maestro'),
    'description' => t('Tokens for use in Maestro notification messages.'),
    'needs-data' => 'maestro',
  ];
  $maestro = [];
  $maestro['task-url'] = [
    'name' => t('Executable URL'),
    'description' => t('The string URL of the task.'),
  ];
  $maestro['task-id'] = [
    'name' => t('Task Machine Name'),
    'description' => t('The task ID or machine name from the template.'),
  ];
  $maestro['task-name'] = [
    'name' => t('Task Label'),
    'description' => t('The name/label given to the task in the workflow editor.'),
  ];
  $maestro['queueid'] = [
    'name' => t('QueueID'),
    'description' => t('The queueID of the task in question.'),
  ];
  $maestro['template-name'] = [
    'name' => t('Template Name'),
    'description' => t('The name of the template.'),
  ];
  $maestro['assigned-user-names'] = [
    'name' => t('Task assigned usernames'),
    'description' => t('The usernames of the assigned actor(s).'),
  ];
  $maestro['assigned-user-emails'] = [
    'name' => t('Task assigned email address'),
    'description' => t('The email addresses of the assigned actor(s).'),
  ];
  $maestro['assigned-roles'] = [
    'name' => t('Task assigned roles'),
    'description' => t('The roles assigned to this task.'),
  ];
  $maestro['template-name'] = [
    'name' => t('Template Name'),
    'description' => t('The name of the template.'),
  ];
  $maestro['entity-identifier'] = [
    'name' => t('Entity Identifier'),
    'description' => t('Use the Entity Identifier to pull a value out of a field.  example: maestro:entity-identifier:uniqueid:field_machine_name.'),
  ];
  return [
    'types' => [
      'maestro' => $type,
    ],
    'tokens' => [
      'maestro' => $maestro,
    ],
  ];
}