public function ExampleRenderable::toRenderable in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/twig_theme_test/src/ExampleRenderable.php \Drupal\twig_theme_test\ExampleRenderable::toRenderable()
- 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_testCode
public function toRenderable() {
return [
'#markup' => 'Example markup',
];
}