class ExampleRenderable

Same name in other branches
  1. 9 core/modules/system/tests/modules/twig_theme_test/src/ExampleRenderable.php \Drupal\twig_theme_test\ExampleRenderable
  2. 10 core/modules/system/tests/modules/twig_theme_test/src/ExampleRenderable.php \Drupal\twig_theme_test\ExampleRenderable
  3. 11.x 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

Title Sort descending Modifiers Object type Summary Overriden Title
ExampleRenderable::toRenderable public function Returns a render array representation of the object. Overrides RenderableInterface::toRenderable

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