function BeforeOrAfter::__construct

Constructor.

Parameters

string $identifier: Identifier of the implementation to move to a new position. The format is the class followed by "::" then the method name. For example, "Drupal\my_module\Hook\MyModuleHooks::methodName".

list<string> $modulesToOrderAgainst: Module names of listeners to order against.

list<string> $identifiersToOrderAgainst: Identifiers of listeners to order against. The format is "$class::$method".

bool $isAfter: TRUE, if the listener to move should be moved after the listener to order against, FALSE if it should be moved before.

File

core/lib/Drupal/Core/Hook/OrderOperation/BeforeOrAfter.php, line 30

Class

BeforeOrAfter
Moves one listener to be called before or after other listeners.

Namespace

Drupal\Core\Hook\OrderOperation

Code

public function __construct(string $identifier, array $modulesToOrderAgainst, array $identifiersToOrderAgainst, bool $isAfter) {
}

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