You are here

function textimage_token_info in Textimage 7.3

Same name and namespace in other branches
  1. 8.4 textimage.module \textimage_token_info()
  2. 8.3 textimage.module \textimage_token_info()

Implements hook_token_info().

File

./textimage.module, line 264
Textimage - Provides text to image manipulations.

Code

function textimage_token_info() {
  $type = array(
    'name' => t('Textimage'),
    'description' => t('Tokens related to Textimage'),
    'needs-data' => 'node',
  );
  $tokens = array(
    'uri' => array(
      'name' => t("URI"),
      'description' => t("The URI(s) of a Textimage generated for a node's field. Use like <strong>[textimage:uri:field{:display}{:sequence}]</strong>, where:<br/><strong>field</strong> is the machine name of the field for which the Textimage is generated (e.g. body or field_xxxx);<br/><strong>display</strong> is an optional indication of the display view mode (e.g. default, full, teaser, etc.); 'default' is used if not specified; <br/><strong>sequence</strong> is an optional indication of the URI to return if Textimage produces more images for the same field (like e.g. in a multi-value Image field); if not specified, a comma-delimited string of all the URIs generated will be returned."),
      'dynamic' => TRUE,
    ),
    'url' => array(
      'name' => t("URL"),
      'description' => t("The URL(s) of a Textimage generated for a node's field. Use like <strong>[textimage:url:field{:display}{:sequence}]</strong>, where:<br/><strong>field</strong> is the machine name of the field for which the Textimage is generated (e.g. body or field_xxxx);<br/><strong>display</strong> is an optional indication of the display view mode (e.g. default, full, teaser, etc.); 'default' is used if not specified; <br/><strong>sequence</strong> is an optional indication of the URL to return if Textimage produces more images for the same field (like e.g. in a multi-value Image field); if not specified, a comma-delimited string of all the URLs generated will be returned."),
      'dynamic' => TRUE,
    ),
  );
  return array(
    'types' => array(
      'textimage' => $type,
    ),
    'tokens' => array(
      'textimage' => $tokens,
    ),
  );
}