You are here

function merci_line_item_token_info in MERCI (Manage Equipment Reservations, Checkout and Inventory) 8.2

Implements hook_token_info().

File

modules/merci_line_item/merci_line_item.tokens.inc, line 16
Builds placeholder replacement tokens for merci_line_item-related data.

Code

function merci_line_item_token_info() {
  $type = [
    'name' => t('Merci'),
    'description' => t('Tokens related to individual content items, or "merci_line_items".'),
    'needs-data' => 'merci_line_item',
  ];

  // Core tokens for merci_line_items.
  $merci_line_item['id'] = [
    'name' => t("Content ID"),
    'description' => t('The unique ID of the content item, or "merci_line_item".'),
  ];
  $merci_line_item['label'] = [
    'name' => t("Title"),
  ];
  return [
    'types' => [
      'merci_line_item' => $type,
    ],
    'tokens' => [
      'merci_line_item' => $merci_line_item,
    ],
  ];
}