You are here

function js_example_theme in Examples for Developers 8

Same name and namespace in other branches
  1. 7 js_example/js_example.module \js_example_theme()
  2. 3.x modules/js_example/js_example.module \js_example_theme()

Implements hook_theme().

Related topics

File

js_example/js_example.module, line 26
Examples showing how to use some of the new JavaScript features in Drupal 8.

Code

function js_example_theme() {
  return [
    'js_example_accordion' => [
      'template' => 'accordion',
      'variables' => [
        'title' => NULL,
      ],
    ],
  ];
}