You are here

function Notifications_Subscription_Simple::get_field in Notifications 7

In this case we can get fields by type or by position

5 calls to Notifications_Subscription_Simple::get_field()
Notifications_Content_Subscription::get_name in notifications_content/notifications_content.inc
Get name
Notifications_Content_Subscription::set_node in notifications_content/notifications_content.inc
Set all the fields we can from node
Notifications_Content_Type_Term_Subscription::get_name in notifications_tags/notifications_tags.inc
Get proper name
Notifications_User_Content_Subscription::get_author in notifications_user/notifications_user.inc
Get author (user field).
Notifications_User_Content_Subscription::get_name in notifications_user/notifications_user.inc
Get name.

File

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

Class

Notifications_Subscription_Simple
Simple subscription.

Code

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;
  }
}