X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Fmodules%2Flayout_builder%2Fsrc%2FForm%2FAjaxFormHelperTrait.php;fp=web%2Fcore%2Fmodules%2Flayout_builder%2Fsrc%2FForm%2FAjaxFormHelperTrait.php;h=0000000000000000000000000000000000000000;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=a5a387020f9d6c383295ca037a4da8380f1d05e3;hpb=74df008bdbb3a11eeea356744f39b802369bda3c;p=yaffs-website diff --git a/web/core/modules/layout_builder/src/Form/AjaxFormHelperTrait.php b/web/core/modules/layout_builder/src/Form/AjaxFormHelperTrait.php deleted file mode 100644 index a5a387020..000000000 --- a/web/core/modules/layout_builder/src/Form/AjaxFormHelperTrait.php +++ /dev/null @@ -1,61 +0,0 @@ -hasAnyErrors()) { - $form['status_messages'] = [ - '#type' => 'status_messages', - '#weight' => -1000, - ]; - $response = new AjaxResponse(); - $response->addCommand(new ReplaceCommand('[data-drupal-selector="' . $form['#attributes']['data-drupal-selector'] . '"]', $form)); - } - else { - $response = $this->successfulAjaxSubmit($form, $form_state); - } - return $response; - } - - /** - * Allows the form to respond to a successful AJAX submission. - * - * @param array $form - * An associative array containing the structure of the form. - * @param \Drupal\Core\Form\FormStateInterface $form_state - * The current state of the form. - * - * @return \Drupal\Core\Ajax\AjaxResponse - * An AJAX response. - */ - abstract protected function successfulAjaxSubmit(array $form, FormStateInterface $form_state); - -}