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

Issue #3324726 by Akhil Babu, xjm, Gauravvv, joachim: #ajax 'options' property is undocumented

(cherry picked from commit 258cef9b)
parent 267b2b2f
No related branches found
No related tags found
16 merge requests!8394[warning] array_flip(): Can only flip STRING and INTEGER values, when saving a non-revisionable custom content entity,!7780issue 3443822: fix for 'No route found for the specified format html. Supported formats: json, xml.',!5013Issue #3071143: Table Render Array Example Is Incorrect,!4848Issue #1566662: Update module should send notifications on Thursdays,!4792Issue #2230689: Remove redundant "Italic" style,!4220Issue #3368223: Link field > Access to internal links is not checked on display.,!3884Issue #3356842,!3870Issue #3087868,!3812Draft: Issue #3339373 by alexpott, andypost, mondrake:...,!3686Issue #3219967 against 9.5.x,!3683Issue #2939397: Clearing AliasManager cache with root path raises warning,!3543Issue #3344259: Allow ajax dialog to have focus configurable,!2205Quote all names in the regions section.,!1459Issue #3087632: menu_name max length is too long,!866Issue #2845319: The highlighting of the 'Home' menu-link does not respect query strings and fragment identifiers,!204Issue #3040556: It is not possible to react to an entity being duplicated
......@@ -2448,6 +2448,28 @@ function hook_validation_constraint_alter(array &$definitions) {
* autocomplete, as a \Symfony\Component\HttpFoundation\JsonResponse object.
* See the @link menu Routing topic @endlink for more information about
* routing.
*
* @section sec_query Query parameters in Ajax requests
* If a form uses an Ajax field, all the query parameters in the current request
* will be also added to the Ajax POST requests along with an additional
* 'ajax_form=1' parameter (See \Drupal\Core\Render\Element\RenderElement).
* @code
* $settings['options']['query'] += \Drupal::request()->query->all();
* $settings['options']['query'][FormBuilderInterface::AJAX_FORM_REQUEST] = TRUE;
* @endcode
*
* Form elements of type 'managed_file' will have an additional
* 'element_parents' query parameter in Ajax POST requests. This parameter will
* include the name of the element and its parents as per the render array.
* This helps to identify the position of the element in the form (See
* \Drupal\file\Element\ManagedFile).
* @code
* 'options' => [
* 'query' => [
* 'element_parents' => implode('/', $element['#array_parents']),
* ],
* ],
* @endcode
*/
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment