You are here

class Notifications_Subscription_Simple in Notifications 7

Simple subscription.

This is the base class for subscriptions that:

  • Have a fixed number of fields defined by the subscription type
  • Have only a field of each type

Hierarchy

Expanded class hierarchy of Notifications_Subscription_Simple

File

./notifications.subscription.inc, line 1636
Drupal Notifications Framework - Default class file

View source
class Notifications_Subscription_Simple extends Notifications_Subscription {

  /**
   * In this case we can get fields by type or by position
   */
  function get_field($index) {
    if (is_numeric($index)) {
      return parent::get_field($index);
    }
    else {
      $mapping = array_flip($this
        ->field_types());
      return isset($mapping[$index]) ? parent::get_field($mapping[$index]) : NULL;
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Notifications_Subscription_Simple::get_field function In this case we can get fields by type or by position