You are here

function Notifications_Subscription::set_field in Notifications 7

Same name and namespace in other branches
  1. 6.4 includes/notifications_subscription.class.inc \Notifications_Subscription::set_field()

Set a field, we may need to find out the position

4 calls to Notifications_Subscription::set_field()
Notifications_Subscription::add_field in ./notifications.subscription.inc
Add field from type, value
Notifications_Subscription::get_instance_fields in ./notifications.subscription.inc
Get instance fields that don't have a value set for this type
Notifications_Subscription::load_fields in ./notifications.subscription.inc
Load condition fields from db
Notifications_Subscription::set_fields in ./notifications.subscription.inc
Set field values, all at a time from the ones coming from the subscription type.

File

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

Class

Notifications_Subscription
Common base for subscription type and subscription instance

Code

function set_field($field) {
  $field
    ->set_subscription($this);
  if (!isset($field->position)) {
    $field->position = $this
      ->map_field($field);
  }
  $this->fields[$field->position] = $field;
  $this->conditions = count($this->fields);
  return $this;
}