You are here

class ExampleRenderable in Drupal 9

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

Provides an example implementation of the RenderableInterface.

Hierarchy

Expanded class hierarchy of ExampleRenderable

File

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

Namespace

Drupal\twig_theme_test
View source
class ExampleRenderable implements RenderableInterface {

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

}

Members

Namesort descending Modifiers Type Description Overrides
ExampleRenderable::toRenderable public function Returns a render array representation of the object. Overrides RenderableInterface::toRenderable