You are here

function rules_ui_add_event_apply in Rules 7.2

Submit callback that just adds the selected event.

See also

rules_admin_add_reaction_rule()

2 calls to rules_ui_add_event_apply()
rules_ui_add_event_page_submit in ui/ui.forms.inc
Submit the event configuration.
rules_ui_add_reaction_rule_submit in rules_admin/rules_admin.inc
Form submit callback.

File

ui/ui.forms.inc, line 505
Rules User Interface forms.

Code

function rules_ui_add_event_apply($form, &$form_state) {
  $handler = rules_get_event_handler($form_state['values']['event']);
  $handler
    ->extractFormValues($form['event_settings'], $form_state);
  $form_state['rules_config']
    ->event($form_state['values']['event'], $handler
    ->getSettings());
}