render-array.html.twig
Same filename in other branches
Default theme implementation for render_array_help.
Themes the render array help portion (from the demonstration page).
Available variables:
- element: Element that will be rendered.
- element['rendered'] : rendered element
- element['unrendered'] : unrendered element
- element['description'] : the description of this example
2 theme calls to render-array.html.twig
- RenderExampleController::arrays in modules/
render_example/ src/ Controller/ RenderExampleController.php - Examples of defining content using renderable arrays.
- RenderExampleController::preRender in modules/
render_example/ src/ Controller/ RenderExampleController.php - A #pre_render callback, expand array to include additional example info.
File
-
modules/
render_example/ templates/ render-array.html.twig
View source
- {#
- /**
- * @file
- * Default theme implementation for render_array_help.
- *
- * Themes the render array help portion (from the demonstration page).
- *
- * Available variables:
- * - element: Element that will be rendered.
- * - element['rendered'] : rendered element
- * - element['unrendered'] : unrendered element
- * - element['description'] : the description of this example
- *
- * @ingroup themeable
- */
- #}
- <div class="render_example--array">
- <h2>{{ element['description'] }}</h2>
- <h3>Rendered Element</h3>
- <div class="render_example--rendered">
- {{ element['rendered'] }}
- </div>
- <h3>Unrendered Element</h3>
- <pre><code class="render_example--code">{{ element['unrendered'] }}</code></pre>
- </div>