You are here

public static function Notifications_Subscription::build_submission in Notifications 6.4

Build from form submission

1 call to Notifications_Subscription::build_submission()
notifications_subscription_base_form_submit in ./notifications.pages.inc
Save edited subscription

File

includes/notifications_subscription.class.inc, line 177
Drupal Notifications Framework - Default class file

Class

Notifications_Subscription
Message destination class

Code

public static function build_submission(&$form_state) {

  // The object may be already created ir it may be an array so we use this function that handles that
  $subscription = notifications_build_subscription($form_state['values']['subscription']);

  // There may be optional fields to add
  if (!empty($form_state['values']['subscription_fields'])) {
    $subscription
      ->set_properties($form_state['values'], array_unique($form_state['values']['subscription_fields']));
  }
  return $subscription;
}