Commit 5f0b3cb4 authored by catch's avatar catch

Issue #2655700 by jhodgdon: ajaxRender() is referenced in documentation but no longer exists

parent a2716608
......@@ -146,8 +146,6 @@ function callback_batch_finished($success, $results, $operations) {
*
* @param \Drupal\Core\Ajax\CommandInterface[] $data
* An array of all the rendered commands that will be sent to the client.
*
* @see \Drupal\Core\Ajax\AjaxResponse::ajaxRender()
*/
function hook_ajax_render_alter(array &$data) {
// Inject any new status messages into the content area.
......
......@@ -1868,8 +1868,7 @@ protected function drupalProcessAjaxResponse($content, array $ajax_response, arr
}
// @todo Ajax commands can target any jQuery selector, but these are
// hard to fully emulate with XPath. For now, just handle 'head'
// and 'body', since these are used by
// \Drupal\Core\Ajax\AjaxResponse::ajaxRender().
// and 'body', since these are used by the Ajax renderer.
elseif (in_array($command['selector'], array('head', 'body'))) {
$wrapperNode = $xpath->query('//' . $command['selector'])->item(0);
}
......
......@@ -22,13 +22,13 @@
*/
class FrameworkTest extends AjaxTestBase {
/**
* Ensures \Drupal\Core\Ajax\AjaxResponse::ajaxRender() returns JavaScript settings from the page request.
* Verifies the Ajax rendering of a command in the settings.
*/
public function testAJAXRender() {
// Verify that settings command is generated if JavaScript settings exist.
$commands = $this->drupalGetAjax('ajax-test/render');
$expected = new SettingsCommand(array('ajax' => 'test'), TRUE);
$this->assertCommand($commands, $expected->render(), '\Drupal\Core\Ajax\AjaxResponse::ajaxRender() loads JavaScript settings.');
$this->assertCommand($commands, $expected->render(), 'JavaScript settings command is present.');
}
/**
......@@ -59,8 +59,8 @@ public function testOrder() {
// Load any page with at least one CSS file, at least one JavaScript file
// and at least one #ajax-powered element. The latter is an assumption of
// drupalPostAjaxForm(), the two former are assumptions of
// AjaxResponse::ajaxRender().
// drupalPostAjaxForm(), the two former are assumptions of the Ajax
// renderer.
// @todo refactor AJAX Framework + tests to make less assumptions.
$this->drupalGet('ajax_forms_test_lazy_load_form');
......
......@@ -50,9 +50,8 @@ public static function dialogContents() {
/**
* Returns a render array that will be rendered by AjaxRenderer.
*
* Ensures that \Drupal\Core\Ajax\AjaxResponse::ajaxRender()
* incorporates JavaScript settings generated during the page request by
* adding a dummy setting.
* Verifies that the response incorporates JavaScript settings generated
* during the page request by adding a dummy setting.
*/
public function render() {
return [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment