You are here

function opigno_certificate_token_info in Opigno certificate 8

Same name and namespace in other branches
  1. 3.x opigno_certificate.tokens.inc \opigno_certificate_token_info()

Implements hook_token_info().

File

./opigno_certificate.tokens.inc, line 15
Builds placeholder replacement tokens for opigno_certificate-related data.

Code

function opigno_certificate_token_info() {
  $type = [
    'name' => t('Certificates'),
    'description' => t('Tokens related to certificates.'),
    'needs-data' => 'opigno_certificate',
  ];
  $opigno_certificate['referencing_entity'] = [
    'name' => t("Referencing entity"),
    'type' => 'entity',
  ];
  return [
    'types' => [
      'group' => $type,
    ],
    'tokens' => [
      'group' => $opigno_certificate,
    ],
  ];
}