You are here

class Notifications_Node_Subscription in Notifications 7

Thread subscription

Hierarchy

Expanded class hierarchy of Notifications_Node_Subscription

1 string reference to 'Notifications_Node_Subscription'
notifications_content_notifications in notifications_content/notifications_content.module
Implementation of hook_notifications()

File

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

View source
class Notifications_Node_Subscription extends Notifications_Content_Subscription {

  /**
   * Get a proper name for this type
   */
  function get_name() {
    if (isset($this->name)) {
      return $this->name;
    }
    elseif ($node = $this
      ->get_field('node:nid')
      ->drupal_object()) {

      // If we've got the node, return node type and title
      return t('@node-type: @node-title', array(
        '@node-type' => node_type_get_name($node),
        '@node-title' => $node->title,
      ));
    }
    else {
      return parent::get_name();
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Notifications_Content_Subscription::set_node public function Set all the fields we can from node 1
Notifications_Node_Subscription::get_name function Get a proper name for this type Overrides Notifications_Content_Subscription::get_name
Notifications_Subscription_Simple::get_field function In this case we can get fields by type or by position