You are here

class Notifications_Content_Type_Term_Subscription in Notifications 7

Subscription to conent type + taxonomy term

Hierarchy

Expanded class hierarchy of Notifications_Content_Type_Term_Subscription

1 string reference to 'Notifications_Content_Type_Term_Subscription'
notifications_tags_notifications in notifications_tags/notifications_tags.module
Implementation of hook_notifications().

File

notifications_tags/notifications_tags.inc, line 240
Drupal Notifications Framework - Default class file

View source
class Notifications_Content_Type_Term_Subscription extends Notifications_Taxonomy_Term_Subscription {

  /**
   * Get proper name
   */
  public function get_name() {
    if (isset($this->name)) {
      return $this->name;
    }
    elseif (($term = $this
      ->get_field('term:tid')) && ($type = $this
      ->get_field('node:type'))) {
      return t('@type posts tagged with @term', array(
        '@type' => $type
          ->get_name(),
        '@term' => $term
          ->get_name(),
      ));
    }
    else {
      parent::get_name();
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Notifications_Content_Type_Term_Subscription::get_name public function Get proper name Overrides Notifications_Taxonomy_Term_Subscription::get_name
Notifications_Subscription_Simple::get_field function In this case we can get fields by type or by position
Notifications_Taxonomy_Term_Subscription::add_term public function Add term object
Notifications_Taxonomy_Term_Subscription::add_term_by_name public function Add term by name (and optional vid)