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