Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
d5d1366e
Commit
d5d1366e
authored
14 years ago
by
Angie Byron
Browse files
Options
Downloads
Patches
Plain Diff
#789186
follow-up by eojthebrave: Better documentation for drupalPostAJAX()
parent
f69f43de
Loading
Loading
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/simpletest/drupal_web_test_case.php
+33
-0
33 additions, 0 deletions
modules/simpletest/drupal_web_test_case.php
with
33 additions
and
0 deletions
modules/simpletest/drupal_web_test_case.php
+
33
−
0
View file @
d5d1366e
...
...
@@ -1892,6 +1892,39 @@ protected function drupalPost($path, $edit, $submit, array $options = array(), a
* array of commands, to update $this->content using equivalent DOM
* manipulation as is used by ajax.js. It also returns the array of commands.
*
* @param $path
* Location of the form containing the AJAX enabled element to test. Can be
* either a Drupal path or an absolute path or NULL to use the current page.
* @param $edit
* Field data in an associative array. Changes the current input fields
* (where possible) to the values indicated.
* @param $triggering_element
* The name of the form element that is responsible for triggering the AJAX
* functionality to test. May be a string or, if the triggering element is
* a button, an associative array where the key is the name of the button
* and the value is the button label. i.e.) array('op' => t('Refresh')).
* @param $ajax_path
* (optional) Override the path set by the AJAX settings of the triggering
* element. In the absence of both the triggering element's AJAX path and
* $ajax_path 'system/ajax' will be used.
* @param $options
* (optional) Options to be forwarded to url().
* @param $headers
* (optional) An array containing additional HTTP request headers, each
* formatted as "name: value". Forwarded to drupalPost().
* @param $form_html_id
* (optional) HTML ID of the form to be submitted, use when there is more
* than one identical form on the same page and the value of the triggering
* element is not enough to identify the form. Note this is not the Drupal
* ID of the form but rather the HTML ID of the form.
* @param $ajax_settings
* (optional) An array of AJAX settings which if specified will be used in
* place of the AJAX settings of the triggering element.
*
* @return
* An array of AJAX commands.
*
* @see drupalPost()
* @see ajax.js
*/
protected
function
drupalPostAJAX
(
$path
,
$edit
,
$triggering_element
,
$ajax_path
=
NULL
,
array
$options
=
array
(),
array
$headers
=
array
(),
$form_html_id
=
NULL
,
$ajax_settings
=
NULL
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment