moduleHandler = $module_handler; $this->hook = $hook; } /** * {@inheritdoc} */ public function getDefinitions() { $definitions = []; foreach ($this->moduleHandler->getImplementations($this->hook) as $module) { $result = $this->moduleHandler->invoke($module, $this->hook); foreach ($result as $plugin_id => $definition) { $definition['provider'] = $module; $definitions[$plugin_id] = $definition; } } return $definitions; } }