You are here

protected function Notifications_Content_Node_List::text_content in Notifications 7

Content text

Overrides Notifications_Message_Template::text_content

2 methods override Notifications_Content_Node_List::text_content()
Notifications_Content_Node_Teasers::text_content in notifications_content/notifications_content.inc
Default texts for this template, may need token replacement
Notifications_Content_Node_View::text_content in notifications_content/notifications_content.inc
Content text.

File

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

Class

Notifications_Content_Node_List
Template for a list of nodes, list of title, links

Code

protected function text_content($options) {

  // @todo There should be a way to format this as an item list
  $content['list'] = array(
    '#title' => t('These are the latest posts:'),
    '#type' => 'messaging_list',
  );
  foreach ($this
    ->node_list() as $node) {
    $content['list'][$node->nid] = array(
      '#type' => 'messaging_link',
      '#title' => $node->title,
      '#href' => 'node/' . $node->nid,
      '#options' => array(
        'absolute' => TRUE,
      ),
    );
  }
  return $content;
}