interface RenderableInterface

Same name in other branches
  1. 9 core/lib/Drupal/Core/Render/RenderableInterface.php \Drupal\Core\Render\RenderableInterface
  2. 8.9.x core/lib/Drupal/Core/Render/RenderableInterface.php \Drupal\Core\Render\RenderableInterface
  3. 10 core/lib/Drupal/Core/Render/RenderableInterface.php \Drupal\Core\Render\RenderableInterface

Defines an object which can be rendered by the Render API.

Hierarchy

Expanded class hierarchy of RenderableInterface

All classes that implement RenderableInterface

6 files declare their use of RenderableInterface
Breadcrumb.php in core/lib/Drupal/Core/Breadcrumb/Breadcrumb.php
ExampleRenderable.php in core/modules/system/tests/modules/twig_theme_test/src/ExampleRenderable.php
FormattedDateDiff.php in core/lib/Drupal/Core/Datetime/FormattedDateDiff.php
Link.php in core/lib/Drupal/Core/Link.php
TwigExtension.php in core/lib/Drupal/Core/Template/TwigExtension.php

... See full list

File

core/lib/Drupal/Core/Render/RenderableInterface.php, line 8

Namespace

Drupal\Core\Render
View source
interface RenderableInterface {
    
    /**
     * Returns a render array representation of the object.
     *
     * @return mixed[]
     *   A render array.
     */
    public function toRenderable();

}

Members

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

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