ThemeNegotiatorInterface

Defines an interface for classes which determine the active theme. To set the active theme, create a new service tagged with 'theme_negotiator' (see the theme.negotiator.admin_theme service in user.services.yml for an example). Your service class needs to implement this interface. If you are setting a theme which is closely tied to the functionality of a particular page or set of pages (such that the page might not function correctly if a different theme is used), make sure to set the priority

ThemeManagerInterface::setActiveTheme

public ThemeManagerInterface::setActiveTheme(ActiveTheme $active_theme) Sets the current active theme manually. Note: This method should not be used in common cases, just in special cases like tests. Parameters \Drupal\Core\Theme\ActiveTheme $active_theme: The new active theme. Return value $this File core/lib/Drupal/Core/Theme/ThemeManagerInterface.php, line 63 Class ThemeManagerInterface Provides a high level access to the active theme and methods to use it. Namespace Drupal\Core\Th

ThemeManagerInterface::resetActiveTheme

public ThemeManagerInterface::resetActiveTheme() Resets the current active theme. Note: This method should not be used in common cases, just in special cases like tests. Return value $this File core/lib/Drupal/Core/Theme/ThemeManagerInterface.php, line 51 Class ThemeManagerInterface Provides a high level access to the active theme and methods to use it. Namespace Drupal\Core\Theme Code public function resetActiveTheme();

ThemeManagerInterface::render

public ThemeManagerInterface::render($hook, array $variables) Generates themed output. See the Default theme implementations topic for details. Parameters string $hook: The name of the theme hook to call. array $variables: An associative array of theme variables. Return value string|\Drupal\Component\Render\MarkupInterface The rendered output, or a Markup object. File core/lib/Drupal/Core/Theme/ThemeManagerInterface.php, line 27 Class ThemeManagerInterface Provides a high level access to

ThemeManagerInterface::hasActiveTheme

public ThemeManagerInterface::hasActiveTheme() Determines whether there is an active theme. Return value bool File core/lib/Drupal/Core/Theme/ThemeManagerInterface.php, line 41 Class ThemeManagerInterface Provides a high level access to the active theme and methods to use it. Namespace Drupal\Core\Theme Code public function hasActiveTheme();

ThemeManagerInterface::getActiveTheme

public ThemeManagerInterface::getActiveTheme() Returns the active theme object. Return value \Drupal\Core\Theme\ActiveTheme File core/lib/Drupal/Core/Theme/ThemeManagerInterface.php, line 34 Class ThemeManagerInterface Provides a high level access to the active theme and methods to use it. Namespace Drupal\Core\Theme Code public function getActiveTheme();

ThemeManagerInterface::alterForTheme

public ThemeManagerInterface::alterForTheme(ActiveTheme $theme, $type, &$data, &$context1 = NULL, &$context2 = NULL) Provides an alter hook for a specific theme. Similar to ::alter, it also invokes the alter hooks for the base themes. Parameters \Drupal\Core\Theme\ActiveTheme $theme: A manually specified theme. string|array $type: A string describing the type of the alterable $data. mixed $data: The variable that will be passed to $theme_TYPE_alter() implementations mixed $context1

ThemeManagerInterface::alter

public ThemeManagerInterface::alter($type, &$data, &$context1 = NULL, &$context2 = NULL) Passes alterable variables to specific $theme_TYPE_alter() implementations. Executes an alter hook on the current theme. It also invokes alter hooks for all base themes. $theme specifies the theme name of the active theme and all its base themes. This dispatch function hands off the passed-in variables to type-specific $theme_TYPE_alter() implementations in the active theme. It ensures a consist

ThemeManagerInterface

Provides a high level access to the active theme and methods to use it. Beside the active theme it provides a wrapper around _theme as well as the alter functionality for themes. Hierarchy interface \Drupal\Core\Theme\ThemeManagerInterface File core/lib/Drupal/Core/Theme/ThemeManagerInterface.php, line 11 Namespace Drupal\Core\Theme Members Name Modifiers Type Description ThemeManagerInterface::alter public function Passes alterable variables to specific $theme_TYPE_alte

ThemeManager::__construct

public ThemeManager::__construct($root, ThemeNegotiatorInterface $theme_negotiator, ThemeInitializationInterface $theme_initialization, ModuleHandlerInterface $module_handler) Constructs a new ThemeManager object. Parameters string $root: The app root. \Drupal\Core\Theme\ThemeNegotiatorInterface $theme_negotiator: The theme negotiator. \Drupal\Core\Theme\ThemeInitializationInterface $theme_initialization: The theme initialization. \Drupal\Core\Extension\ModuleHandlerInterface $module_handler: