function RelativeOrderBase::__construct

Constructor.

Parameters

list<string> $modules: A list of modules the implementations should order against.

list<array{class-string, string}> $classesAndMethods: A list of implementations to order against, as [$class, $method].

File

core/lib/Drupal/Core/Hook/Order/RelativeOrderBase.php, line 23

Class

RelativeOrderBase
Orders an implementation relative to other implementations.

Namespace

Drupal\Core\Hook\Order

Code

public function __construct(array $modules = [], array $classesAndMethods = []) {
    if (!$this->modules && !$this->classesAndMethods) {
        throw new \LogicException('Order must provide either modules or class-method pairs to order against.');
    }
}

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