You are here

public function ExampleRenderable::toRenderable in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/twig_theme_test/src/ExampleRenderable.php \Drupal\twig_theme_test\ExampleRenderable::toRenderable()
  2. 9 core/modules/system/tests/modules/twig_theme_test/src/ExampleRenderable.php \Drupal\twig_theme_test\ExampleRenderable::toRenderable()

Returns a render array representation of the object.

Return value

mixed[] A render array.

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',
  ];
}