You are here

public function ModuleHandlerInterface::invokeDeprecated in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php \Drupal\Core\Extension\ModuleHandlerInterface::invokeDeprecated()
  2. 10 core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php \Drupal\Core\Extension\ModuleHandlerInterface::invokeDeprecated()

Invokes a deprecated hook in a particular module.

Invoking a deprecated hook adds the behavior of triggering an E_USER_DEPRECATED error if any implementations are found.

API maintainers should use this method instead of invoke() when their hook is deprecated. This method does not detect when a hook is deprecated.

Parameters

string $description: Helpful text describing what to do instead of implementing this hook.

string $module: The name of the module (without the .module 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.

See also

\Drupal\Core\Extension\ModuleHandlerInterface::invoke()

https://www.drupal.org/core/deprecation#how-hook

1 method overrides ModuleHandlerInterface::invokeDeprecated()
ModuleHandler::invokeDeprecated in core/lib/Drupal/Core/Extension/ModuleHandler.php
Invokes a deprecated hook in a particular module.

File

core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php, line 265

Class

ModuleHandlerInterface
Interface for classes that manage a set of enabled modules.

Namespace

Drupal\Core\Extension

Code

public function invokeDeprecated($description, $module, $hook, array $args = []);