Skip to content
Snippets Groups Projects
Commit a9614d53 authored by catch's avatar catch
Browse files

Issue #2385803 by a_thakur: Remove form_execute_handlers() from form.inc

parent 44aa06ab
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -30,25 +30,6 @@ function drupal_form_submit($form_arg, FormStateInterface $form_state) { ...@@ -30,25 +30,6 @@ function drupal_form_submit($form_arg, FormStateInterface $form_state) {
\Drupal::formBuilder()->submitForm($form_arg, $form_state); \Drupal::formBuilder()->submitForm($form_arg, $form_state);
} }
/**
* Executes custom validation and submission handlers for a given form.
*
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
* Use either \Drupal::service('form_submitter')->executeSubmitHandlers() or
* \Drupal::service('form_validator')->executeValidateHandlers().
*
* @see \Drupal\Core\Form\FormSubmitterInterface::executeSubmitHandlers()
* @see \Drupal\Core\Form\FormValidatorInterface::executeValidateHandlers()
*/
function form_execute_handlers($type, &$form, FormStateInterface $form_state) {
if ($type == 'submit') {
\Drupal::service('form_submitter')->executeSubmitHandlers($form, $form_state);
}
elseif ($type == 'validate') {
\Drupal::service('form_validator')->executeValidateHandlers($form, $form_state);
}
}
/** /**
* Removes internal Form API elements and buttons from submitted form values. * Removes internal Form API elements and buttons from submitted form values.
* *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment