From 6fa18532ad50a8fbc1928b9a4e3c1e63912e93de Mon Sep 17 00:00:00 2001 From: Tom Stovall Date: Thu, 14 Nov 2024 05:17:56 -0800 Subject: [PATCH] adding form alter --- src/Plugin/FormAlter/SolrReloadFormAlter.php | 38 ++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/Plugin/FormAlter/SolrReloadFormAlter.php diff --git a/src/Plugin/FormAlter/SolrReloadFormAlter.php b/src/Plugin/FormAlter/SolrReloadFormAlter.php new file mode 100644 index 00000000..f6fae35b --- /dev/null +++ b/src/Plugin/FormAlter/SolrReloadFormAlter.php @@ -0,0 +1,38 @@ +getValues()); + $submit_handler = __CLASS__ . '::formSubmit'; + array_unshift($form['actions']['submit']['#submit'], $submit_handler); + } + + /** + * Custom form submit. + */ + public static function formSubmit($form, FormStateInterface $form_state) { + print_r($form_state->getValues()); + exit(1); + } + +} \ No newline at end of file