public function ModuleHandlerInterface::invokeDeprecated in Drupal 9
Same name and namespace in other branches
- 8 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\ExtensionCode
public function invokeDeprecated($description, $module, $hook, array $args = []);