public function Container::loadSpecsFromHook in Little helpers 7.2
Load specs by invoking a hook.
Parameters
string $hook: Name of the hook to invoke.
mixed ...$arguments: Arguments that should be passed to the hook invocations.
File
- src/
Services/ Container.php, line 91
Class
- Container
- Dependency injection container.
Namespace
Drupal\little_helpers\ServicesCode
public function loadSpecsFromHook(string $hook, ...$arguments) {
$info = module_invoke_all($hook, ...$arguments);
$specs = $this
->processInfo($info);
drupal_alter($hook, $specs, ...$arguments);
$this->specs = array_replace($this->specs, $specs);
}