You are here

function sweaver_frontend_submit in Sweaver 7

Same name and namespace in other branches
  1. 6 sweaver.module \sweaver_frontend_submit()

Sweaver frontend submit.

File

./sweaver.module, line 699
Sweaver functions.

Code

function sweaver_frontend_submit($form, &$form_state) {
  $sweaver = Sweaver::get_instance();
  foreach (array_keys($sweaver
    ->get_plugins_registry(TRUE)) as $plugin_name) {
    $sweaver_plugin = $sweaver
      ->get_plugin($plugin_name);

    // In the first version, we'll let everyone who has submit methods
    // simply do their stuff with the submitted values.
    $sweaver_plugin
      ->sweaver_form_submit($form, $form_state);
  }

  // Redirect to same path. We issue this function so things like
  // session, current style and possible others are properly set.
  drupal_goto();
}