You are here

public static function Notifications_Subscription::build_from_submission in Notifications 7

Build subscription instance from form submission

File

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

Class

Notifications_Subscription
Common base for subscription type and subscription instance

Code

public static function build_from_submission($form, &$form_state) {

  // The subscription object should be here, it may be a subscription type
  $subscription = $form_state['values']['subscription'];
  return $subscription
    ->instance();
}