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
- class \Notifications_Subscription_Simple extends \Notifications_Subscription
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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Notifications_Subscription_Simple:: |
function | In this case we can get fields by type or by position |