W3cubDocs

/Drupal 8

interface BareHtmlPageRendererInterface

Bare HTML page renderer.

By "bare HTML page", we mean that the following hooks that allow for "normal" pages are not invoked:

Examples of bare HTML pages are:

i.e. use this when rendering HTML pages in limited environments. Otherwise, use a

_controller 

route, and return a render array. This will cause a main content renderer (\Drupal\Core\Render\MainContent\MainContentRendererInterface) to be used, and in case of a HTML request that will be \Drupal\Core\Render\MainContent\HtmlRenderer.

In fact, this is not only *typically* used in a limited environment, it even *must* be used in a limited environment: when using the bare HTML page renderer, use as little state/additional services as possible, because the same safeguards aren't present (precisely because this is intended to be used in a limited environment).

Currently, there are two types of bare pages available:

Hierarchy

See also

\Drupal\Core\Render\MainContent\HtmlRenderer

File

core/lib/Drupal/Core/Render/BareHtmlPageRendererInterface.php, line 42

Namespace

Drupal\Core\Render

Members

Name Modifiers Type Description
BareHtmlPageRendererInterface::renderBarePage public function Renders a bare page.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!BareHtmlPageRendererInterface.php/interface/BareHtmlPageRendererInterface/8.1.x