You are here

function Notifications_Content_Subscription::get_name in Notifications 7

Get name

1 call to Notifications_Content_Subscription::get_name()
Notifications_Node_Subscription::get_name in notifications_content/notifications_content.inc
Get a proper name for this type
2 methods override Notifications_Content_Subscription::get_name()
Notifications_Node_Subscription::get_name in notifications_content/notifications_content.inc
Get a proper name for this type
Notifications_User_Content_Subscription::get_name in notifications_user/notifications_user.inc
Get name.

File

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

Class

Notifications_Content_Subscription
Generic content subscription Thread subscription

Code

function get_name() {
  if (isset($this->name)) {
    return $this->name;
  }
  else {
    $type_name = ($type = $this
      ->get_field('node:type')) ? $type
      ->get_name() : t('Content');
    if ($author = $this
      ->get_field('node:uid')) {
      return t('@type posts by @author', array(
        '@type' => $type_name,
        '@author' => $author
          ->get_name(),
      ));
    }
    else {
      return t('@type posts', array(
        '@type' => $type_name,
      ));
    }
  }
}