function HookCollectorPass::getOrderOperations

Gets order operations by hook.

Return value

array<string, list<\Drupal\Core\Hook\OrderOperation\OrderOperation>> Order operations by hook name.

2 calls to HookCollectorPass::getOrderOperations()
HookCollectorPass::calculateImplementations in core/lib/Drupal/Core/Hook/HookCollectorPass.php
Calculates the ordered implementations.
HookCollectorPass::writeToContainer in core/lib/Drupal/Core/Hook/HookCollectorPass.php
Writes collected definitions to the container builder.

File

core/lib/Drupal/Core/Hook/HookCollectorPass.php, line 264

Class

HookCollectorPass
Collects and registers hook implementations.

Namespace

Drupal\Core\Hook

Code

protected function getOrderOperations() : array {
    $operations_by_hook = [];
    foreach ($this->orderOperations as $hook => $order_operations_by_weight) {
        ksort($order_operations_by_weight);
        $operations_by_hook[$hook] = array_merge(...$order_operations_by_weight);
    }
    return $operations_by_hook;
}

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