You are here

function Notifications_Node_Event_Template::default_text in Notifications 7

Default texts for this template, may need token replacement

Overrides Notifications_Message_Template::default_text

2 calls to Notifications_Node_Event_Template::default_text()
Notifications_Node_Comment_Template::default_text in notifications_content/notifications_content.inc
Default texts for this template, may need token replacement
Notifications_Node_Insert_Template::default_text in notifications_content/notifications_content.inc
Default texts for this template, may need token replacement
2 methods override Notifications_Node_Event_Template::default_text()
Notifications_Node_Comment_Template::default_text in notifications_content/notifications_content.inc
Default texts for this template, may need token replacement
Notifications_Node_Insert_Template::default_text in notifications_content/notifications_content.inc
Default texts for this template, may need token replacement

File

notifications_content/notifications_content.inc, line 220
Drupal Notifications Framework - Default class file

Class

Notifications_Node_Event_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 [node:type-name]: [node:title]', array(), $options),
      );
    case 'content':
      return array(
        '#type' => 'messaging_template_text',
        '#tokens' => TRUE,
        'header' => t('Update for [node:type-name]: [node:title]', array(), $options),
        'teaser' => '[node:summary]',
        'more' => array(
          '#type' => 'messaging_link',
          '#text' => t('Read more', array(), $options),
          '#url' => '[node:url]',
        ),
      );
    case 'digest':
      return array(
        '#tokens' => TRUE,
        'title' => '[node:title]',
        'more' => t('Read more [node:url]', array(), $options),
      );
    default:
      return parent::default_text($type, $options);
  }
}