function render_example_theme

Same name in other branches
  1. 3.x modules/render_example/render_example.module \render_example_theme()
  2. 7.x-1.x render_example/render_example.module \render_example_theme()
  3. 4.0.x modules/render_example/render_example.module \render_example_theme()

Implements hook_theme().

Related topics

File

render_example/render_example.module, line 71

Code

function render_example_theme() {
    return [
        // These theme hooks are both used by examples in
        // \Drupal\render_example\Controller\RenderExampleController::arrays().
'render_example_add_div' => [
            'render element' => 'element',
        ],
        'render_array' => [
            'render element' => 'element',
        ],
        // This is used in combination with \Drupal\render_example\Element\Marquee
        // to define a new custom render element type that allows for the use of
        // '#type' => 'marquee' elements in a render array.
'render_example_marquee' => [
            'variables' => [
                'content' => '',
                'attributes' => [],
            ],
        ],
    ];
}