You are here

public function Notifications_Subscription_List::filter_option in Notifications 7

Filter out subscription types for a given option

File

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

Class

Notifications_Subscription_List
List of subscriptions or subscription types

Code

public function filter_option($option, $value = TRUE) {
  foreach ($this->subscriptions as $index => $subscription) {
    if (notifications_subscription_type($subscription->type, $option) != $value) {
      unset($this->subscriptions[$index]);
    }
  }
  return $this;
}