You are here

function Notifications_Node_Subscription::get_name in Notifications 7

Get a proper name for this type

Overrides Notifications_Content_Subscription::get_name

File

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

Class

Notifications_Node_Subscription
Thread subscription

Code

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();
  }
}