You are here

function theme_legacy_test_theme in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/system/tests/modules/theme_legacy_test/theme_legacy_test.module \theme_legacy_test_theme()

Implements hook_theme().

File

core/modules/system/tests/modules/theme_legacy_test/theme_legacy_test.module, line 13
Test module for legacy theme functions.

Code

function theme_legacy_test_theme($existing, $type, $theme, $path) {
  $items['theme_test'] = [
    'file' => 'theme_legacy_test.inc',
    'variables' => [
      'foo' => '',
    ],
    'function' => 'theme_theme_test',
  ];
  $items['theme_test_function_suggestions'] = [
    'variables' => [],
    'function' => 'theme_theme_test_function_suggestions',
  ];
  $items['theme_test_suggestions_include'] = [
    'variables' => [],
    'function' => 'theme_theme_test_suggestions_include',
  ];
  $items['theme_test_foo'] = [
    'variables' => [
      'foo' => NULL,
    ],
    'function' => 'theme_theme_test_foo',
  ];
  $items['theme_test_render_element_children'] = [
    'render element' => 'element',
    'function' => 'theme_theme_test_render_element_children',
  ];
  $items['theme_test_function_template_override'] = [
    'variables' => [],
    'function' => 'theme_theme_test_function_template_override',
  ];
  $info['test_theme_not_existing_function'] = [
    'function' => 'test_theme_not_existing_function',
  ];
  return $items;
}