class TestAjaxRenderer in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Controller/AjaxRendererTest.php \Drupal\Tests\Core\Controller\TestAjaxRenderer
Hierarchy
- class \Drupal\Core\Render\MainContent\AjaxRenderer implements MainContentRendererInterface
- class \Drupal\Tests\Core\Controller\TestAjaxRenderer
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\ControllerView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AjaxRenderer:: |
protected | property | The controller resolver. | |
AjaxRenderer:: |
protected | property | The element info manager. | |
AjaxRenderer:: |
public | function |
Renders the main content render array into a response. Overrides MainContentRendererInterface:: |
|
AjaxRenderer:: |
public | function | Constructs a new AjaxRenderer instance. | |
TestAjaxRenderer:: |
protected | function |
Wraps drupal_render_root(). Overrides AjaxRenderer:: |