You are here

function Notifications_User_Content_Subscription::get_name in Notifications 7

Get name.

Overrides Notifications_Content_Subscription::get_name

File

notifications_user/notifications_user.inc, line 36
User subscriptions for Notifications

Class

Notifications_User_Content_Subscription
Generic content subscription Thread subscription.

Code

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