You are here

ExampleRenderable.php in Drupal 10

File

core/modules/system/tests/modules/twig_theme_test/src/ExampleRenderable.php
View source
<?php

namespace Drupal\twig_theme_test;

use Drupal\Core\Render\RenderableInterface;

/**
 * Provides an example implementation of the RenderableInterface.
 */
class ExampleRenderable implements RenderableInterface {

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

}

Classes

Namesort descending Description
ExampleRenderable Provides an example implementation of the RenderableInterface.