You are here

class TestAjaxRenderer in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Controller/AjaxRendererTest.php \Drupal\Tests\Core\Controller\TestAjaxRenderer

Hierarchy

Expanded class hierarchy of TestAjaxRenderer

File

core/tests/Drupal/Tests/Core/Controller/AjaxRendererTest.php, line 83
Contains \Drupal\Tests\Core\Controller\AjaxRendererTest.

Namespace

Drupal\Tests\Core\Controller
View source
class TestAjaxRenderer extends AjaxRenderer {

  /**
   * {@inheritdoc}
   */
  protected function drupalRenderRoot(&$elements, $is_root_call = FALSE) {
    $elements += [
      '#attached' => [],
    ];
    if (isset($elements['#markup'])) {
      return $elements['#markup'];
    }
    elseif (isset($elements['#type'])) {
      return $elements['#type'];
    }
    else {
      return 'Markup';
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AjaxRenderer::$controllerResolver protected property The controller resolver.
AjaxRenderer::$elementInfoManager protected property The element info manager.
AjaxRenderer::renderResponse public function Renders the main content render array into a response. Overrides MainContentRendererInterface::renderResponse
AjaxRenderer::__construct public function Constructs a new AjaxRenderer instance.
TestAjaxRenderer::drupalRenderRoot protected function Wraps drupal_render_root(). Overrides AjaxRenderer::drupalRenderRoot