You are here

function Notifications_Subscription::set_fields in Notifications 7

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

Set field values, all at a time from the ones coming from the subscription type.

4 calls to Notifications_Subscription::set_fields()
Notifications_Subscription::get_fields in ./notifications.subscription.inc
Get fields as array of field objects
Notifications_Subscription::load_fields in ./notifications.subscription.inc
Load condition fields from db
Notifications_Subscription::set_properties in ./notifications.subscription.inc
Save fields from form submission
Notifications_Subscription::set_properties_from_submission in ./notifications.subscription.inc
Set instance properties from form submission

File

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

Class

Notifications_Subscription
Common base for subscription type and subscription instance

Code

function set_fields($fields = NULL) {
  if (isset($fields)) {
    $this->fields = array();
    foreach ($fields as $field) {
      $this
        ->set_field($field);
    }
  }
  elseif (!isset($this->fields)) {
    $this
      ->set_fields($this
      ->type_fields());
  }
}