function ModuleHandler::getHookOrderingRules

Gets ordering rules for a hook.

Parameters

string $hook: Hook name.

Return value

list<\Drupal\Core\Hook\OrderOperation\OrderOperation> List of order operations for the hook.

1 call to ModuleHandler::getHookOrderingRules()
ModuleHandler::getCombinedListeners in core/lib/Drupal/Core/Extension/ModuleHandler.php
Builds a list of listeners for an alter hook.

File

core/lib/Drupal/Core/Extension/ModuleHandler.php, line 613

Class

ModuleHandler
Class that manages modules in a Drupal installation.

Namespace

Drupal\Core\Extension

Code

protected function getHookOrderingRules(string $hook) : array {
    return $this->orderingRules[$hook] ??= array_map(OrderOperation::unpack(...), $this->packedOrderOperations[$hook] ?? []);
}

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