1 theme_test.module theme_test_init()

Implements hook_init().

File

core/modules/simpletest/tests/theme_test.module, line 71

Code

function theme_test_init() {
  if (arg(0) == 'theme-test' && arg(1) == 'hook-init') {
    // First, force the theme registry to be rebuilt on this page request. This
    // allows us to test a full initialization of the theme system in the code
    // below.
    backdrop_theme_rebuild();
    // Next, initialize the theme system by storing themed text in a global
    // variable. We will use this later in theme_test_hook_init_page_callback()
    // to test that even when the theme system is initialized this early, it is
    // still capable of returning output and theming the page as a whole.
    $GLOBALS['theme_test_output'] = theme('more_link', array('url' => 'user', 'title' => 'Themed output generated in hook_init()'));
  }
}