final class Hooks

Implements module hooks.

Methods

__construct(ModuleHandlerInterface $moduleHandler, FilterPluginManager $filterManager, ConfigFactoryInterface $configFactory)

Constructs a new Hooks object.

string|Stringable|array|null
help(string $route_name, RouteMatchInterface $route_match)

Implements hook_help().

array
theme(array $existing, string $type, string $theme, string $path)

Implements hook_theme().

Details

at line 24
__construct(ModuleHandlerInterface $moduleHandler, FilterPluginManager $filterManager, ConfigFactoryInterface $configFactory)

Constructs a new Hooks object.

Parameters

ModuleHandlerInterface $moduleHandler
FilterPluginManager $filterManager
ConfigFactoryInterface $configFactory

at line 39
string|Stringable|array|null help(string $route_name, RouteMatchInterface $route_match)

Implements hook_help().

Parameters

string $route_name
RouteMatchInterface $route_match

Return Value

string|Stringable|array|null

The help text or render array.

at line 76
array theme(array $existing, string $type, string $theme, string $path)

Implements hook_theme().

Parameters

array $existing

An array of existing implementations for override purposes.

string $type

Whether a theme, module, etc. is being processed.

string $theme

The actual name of theme, module, etc. being processed.

string $path

The directory path of the theme or module, so that it doesn't need to be looked up.

Return Value

array

An associative array of theme hook information.