function public function Element::renderRoot

8.x-3.x Element.php public Element::renderRoot()

Renders the final element HTML.

(Cannot be executed within another render context.)

Return value

\Drupal\Component\Render\MarkupInterface The rendered HTML.

Class

Element
Provides helper methods for Drupal render elements.

Namespace

Drupal\bootstrap\Utility

Source src/Utility/Element.php (line 598)

public function renderRoot() {
  /** @var \Drupal\Core\Render\Renderer $renderer */
  $renderer = \Drupal::service('renderer');
  return $renderer->renderRoot($this->array);
}