function ThemeManagerInterface::invoke

Invokes a hook in a particular theme.

Parameters

string $theme_key: The name of the theme (without the .theme extension).

string $hook: The name of the hook to invoke.

array $args: Arguments to pass to the hook implementation.

Return value

mixed The return value of the hook implementation.

1 method overrides ThemeManagerInterface::invoke()
ThemeManager::invoke in core/lib/Drupal/Core/Theme/ThemeManager.php
Invokes a hook in a particular theme.

File

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

Class

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

Namespace

Drupal\Core\Theme

Code

public function invoke(string $theme_key, string $hook, array $args = []);

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