1 menu_test.module menu_test_theme_callback($argument)

Theme callback to use when testing the theme callback functionality.

Parameters

$argument: The argument passed in from the URL.

Return value

The name of the custom theme to request for the current page.:

File

core/modules/simpletest/tests/menu_test.module, line 461
Dummy module implementing hook menu.

Code

function menu_test_theme_callback($argument) {
  // Test using the variable administrative theme.
  if ($argument == 'use-admin-theme') {
    return config_get('system.core', 'admin_theme');
  }
  // Test using a theme that exists, but may or may not be enabled.
  elseif ($argument == 'use-stark-theme') {
    return 'stark';
  }
  // Test using a theme that does not exist.
  elseif ($argument == 'use-fake-theme') {
    return 'fake_theme';
  }
  // For any other value of the URL argument, do not return anything. This
  // allows us to test that returning nothing from a theme callback function
  // causes the page to correctly fall back on using the main site theme.
}