function ExampleRenderable::toRenderable

Same name in other branches
  1. 9 core/modules/system/tests/modules/twig_theme_test/src/ExampleRenderable.php \Drupal\twig_theme_test\ExampleRenderable::toRenderable()
  2. 10 core/modules/system/tests/modules/twig_theme_test/src/ExampleRenderable.php \Drupal\twig_theme_test\ExampleRenderable::toRenderable()
  3. 11.x core/modules/system/tests/modules/twig_theme_test/src/ExampleRenderable.php \Drupal\twig_theme_test\ExampleRenderable::toRenderable()

Overrides RenderableInterface::toRenderable

File

core/modules/system/tests/modules/twig_theme_test/src/ExampleRenderable.php, line 15

Class

ExampleRenderable
Provides an example implementation of the RenderableInterface.

Namespace

Drupal\twig_theme_test

Code

public function toRenderable() {
    return [
        '#markup' => 'Example markup',
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.