You are here

function Notifications_Taxonomy_Term_Create_Template::default_text in Notifications 7

Default texts for this template, may need token replacement

Overrides Notifications_Message_Template::default_text

File

notifications_tags/notifications_tags.inc, line 333
Drupal Notifications Framework - Default class file

Class

Notifications_Taxonomy_Term_Create_Template
Message templates for node events. Base class.

Code

function default_text($type, $options) {
  switch ($type) {
    case 'subject':
      return array(
        '#tokens' => TRUE,
        '#markup' => t('Update for [vocabulary:name]', array(), $options),
      );
    case 'content':
      return array(
        '#type' => 'messaging_template_text',
        '#tokens' => TRUE,
        'header' => t('Update for [vocabulary:name]:', array(), $options),
        'teaser' => 'A new term has been created: [term:name]',
        'more' => array(
          '#type' => 'messaging_link',
          '#text' => t('Read more', array(), $options),
          '#url' => '[term:url]',
        ),
      );
    case 'digest':
      return t('New term [term:name] created for vocabulary [vocabulary:name].', array(), $options);
    default:
      return parent::default_text($type, $options);
  }
}