function HookOrderTestBase::getPriority

Get the priority for a service.

5 calls to HookOrderTestBase::getPriority()
HookOrderEqualPriorityTest::setUp in core/tests/Drupal/Tests/Core/Hook/HookOrderEqualPriorityTest.php
HookOrderEqualPriorityTest::testAfter in core/tests/Drupal/Tests/Core/Hook/HookOrderEqualPriorityTest.php
@covers ::after
HookOrderEqualPriorityTest::testBefore in core/tests/Drupal/Tests/Core/Hook/HookOrderEqualPriorityTest.php
@covers ::before
HookOrderEqualPriorityTest::testFirst in core/tests/Drupal/Tests/Core/Hook/HookOrderEqualPriorityTest.php
@covers ::first
HookOrderEqualPriorityTest::testLast in core/tests/Drupal/Tests/Core/Hook/HookOrderEqualPriorityTest.php
@covers ::last
1 method overrides HookOrderTestBase::getPriority()
HookOrderTest::getPriority in core/tests/Drupal/Tests/Core/Hook/HookOrderTest.php
Get the priority for a service.

File

core/tests/Drupal/Tests/Core/Hook/HookOrderTestBase.php, line 49

Class

HookOrderTestBase

Namespace

Drupal\Tests\Core\Hook

Code

protected function getPriority(string $name) : int {
    $definition = $this->container
        ->getDefinition($name);
    return $definition->getTags()['kernel.event_listener'][0]['priority'];
}

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