You are here

function Notifications_Subscription_List::get_instances in Notifications 7

Get all of the subscriptions that are actual instances

5 calls to Notifications_Subscription_List::get_instances()
Notifications_Subscription_List::element_checkboxes in ./notifications.list.inc
Build fieldset with subscription options
Notifications_Subscription_List::element_items in ./notifications.list.inc
Build fieldset with subscription names
Notifications_Subscription_List::form_operation in ./notifications.list.inc
Form operation
Notifications_Subscription_List::get_links in ./notifications.list.inc
Get all subscription links
Notifications_Subscription_List::get_stored in ./notifications.list.inc
Get only existing subscription instances (stored)

File

./notifications.list.inc, line 88
Drupal Notifications Framework - Default class file

Class

Notifications_Subscription_List
List of subscriptions or subscription types

Code

function get_instances() {
  $this
    ->load_instances();
  $list = array();
  foreach ($this->subscriptions as $index => $subscription) {
    if ($subscription
      ->is_instance()) {
      $list[$index] = $subscription;
    }
    else {
      $list[$index] = $subscription
        ->instance();
    }
  }
  return $list;
}