class RemoveHook

Removes an already existing implementation.

The effect of this attribute is independent from the specific class or method on which it is placed.

Hierarchy

Expanded class hierarchy of RemoveHook

4 files declare their use of RemoveHook
DHooks.php in core/modules/system/tests/modules/HookOrder/ddd_hook_order_test/src/Hook/DHooks.php
HookCollectorPass.php in core/lib/Drupal/Core/Hook/HookCollectorPass.php
NavigationHooks.php in core/modules/navigation/src/Hook/NavigationHooks.php
TestHookRemove.php in core/modules/system/tests/modules/hook_test_remove/src/Hook/TestHookRemove.php

File

core/lib/Drupal/Core/Hook/Attribute/RemoveHook.php, line 13

Namespace

Drupal\Core\Hook\Attribute
View source
class RemoveHook implements HookAttributeInterface {
    
    /**
     * Constructs a RemoveHook object.
     *
     * @param string $hook
     *   The hook name from which to remove the target implementation.
     * @param class-string $class
     *   The class name of the target hook implementation.
     * @param string $method
     *   The method name of the target hook implementation.
     *   If the class instance itself is the listener, this should be '__invoke'.
     */
    public function __construct(string $hook, string $class, string $method) {
    }

}

Members

Title Sort descending Modifiers Object type Summary
RemoveHook::__construct public function Constructs a RemoveHook object.

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