function ReorderHook::__construct

Constructs a ReorderHook object.

Parameters

string $hook: The hook for which to reorder an implementation.

class-string $class: The class of the targeted hook implementation.

string $method: The method name of the targeted hook implementation. If the #[Hook] attribute is on the class itself, this should be '__invoke'.

\Drupal\Core\Hook\Order\OrderInterface $order: Specifies a new position for the targeted hook implementation relative to other implementations.

File

core/lib/Drupal/Core/Hook/Attribute/ReorderHook.php, line 33

Class

ReorderHook
Sets the order of an already existing implementation.

Namespace

Drupal\Core\Hook\Attribute

Code

public function __construct(string $hook, string $class, string $method, OrderInterface $order) {
}

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