You are here

function rules_forms_invoke_event in Rules 6

Invoke rules event of a certain type.

3 calls to rules_forms_invoke_event()
rules_forms_event_submit in rules_forms/rules_forms.module
Submit handler to invoke "form submitted" events
rules_forms_event_validate in rules_forms/rules_forms.module
Validation handler to invoke "form validate" events
rules_forms_form_alter in rules_forms/rules_forms.module
Implementation of hook_form_alter().

File

rules_forms/rules_forms.module, line 83
Rules forms module.

Code

function rules_forms_invoke_event($event_type, &$form, &$form_state, $form_id = NULL) {
  if (empty($form_id)) {
    $form_id = $form['form_id']['#value'];
  }
  $action_args = array(
    'form' => &$form,
    'form_state' => &$form_state,
    'form_id' => $form_id,
  );
  rules_invoke_event($form_id . '_' . $event_type, $action_args);
}