function RelativeOrderBase::getOperation
Gets order operations specified by this object.
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".
Return value
\Drupal\Core\Hook\OrderOperation\OrderOperation Order operation to apply to a hook implementation list.
Overrides OrderInterface::getOperation
File
-
core/
lib/ Drupal/ Core/ Hook/ Order/ RelativeOrderBase.php, line 44
Class
- RelativeOrderBase
- Orders an implementation relative to other implementations.
Namespace
Drupal\Core\Hook\OrderCode
public function getOperation(string $identifier) : OrderOperation {
return new BeforeOrAfter($identifier, $this->modules, array_map(static fn(array $class_and_method) => implode('::', $class_and_method), $this->classesAndMethods), $this->isAfter());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.