function ThemeManagerInterface::alterForTheme

Same name in other branches
  1. 9 core/lib/Drupal/Core/Theme/ThemeManagerInterface.php \Drupal\Core\Theme\ThemeManagerInterface::alterForTheme()
  2. 8.9.x core/lib/Drupal/Core/Theme/ThemeManagerInterface.php \Drupal\Core\Theme\ThemeManagerInterface::alterForTheme()
  3. 11.x core/lib/Drupal/Core/Theme/ThemeManagerInterface.php \Drupal\Core\Theme\ThemeManagerInterface::alterForTheme()

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: (optional) An additional variable that is passed by reference.

mixed $context2: (optional) An additional variable that is passed by reference.

See also

::alter

File

core/lib/Drupal/Core/Theme/ThemeManagerInterface.php, line 148

Class

ThemeManagerInterface
Provides a high level access to the active theme and methods to use it.

Namespace

Drupal\Core\Theme

Code

public function alterForTheme(ActiveTheme $theme, $type, &$data, &$context1 = NULL, &$context2 = NULL);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.