/** * Loads data from array of link definitions * * @param array $definitions * @param \Krystal\Application\Module\ModuleManagerInterface $moduleManager * @return void */ public function loadFromDefiniton(array $definitions, ModuleManagerInterface $moduleManager) { foreach ($definitions as $definition) { if (isset($definition['module']) && $moduleManager->isLoaded($definition['module'])) { if (isset($definition['services']) && is_array($definition['services'])) { foreach ($definition['services'] as $name => $service) { $this->addService($name, $moduleManager->getModule($definition['module'])->getService($service)); } } } } }
/** * {@inheritDoc} */ public function bootstrap() { $siteService = $this->moduleManager->getModule('Team')->getService('siteService'); $this->view->addVariable('team', $siteService); }