protected function registerCommands() { parent::registerCommands(); $container = $this->getKernel()->getContainer(); $siteAccess = $container->get('ezpublish.siteaccess'); $siteAccess->name = $this->siteAccessName ?: $container->getParameter('ezpublish.siteaccess.default'); $siteAccess->matchingType = 'cli'; }
protected function registerCommands() { parent::registerCommands(); $container = $this->getKernel()->getContainer(); $this->siteAccessName = $this->siteAccessName ?: $container->getParameter('ezpublish.siteaccess.default'); $siteAccess = new SiteAccess($this->siteAccessName, 'cli'); $container->set('ezpublish.siteaccess', $siteAccess); }
protected function registerCommands() { parent::registerCommands(); $container = $this->getKernel()->getContainer(); $siteAccess = $container->get('ezpublish.siteaccess'); $siteAccess->name = $this->siteAccessName ?: $container->getParameter('ezpublish.siteaccess.default'); $siteAccess->matchingType = 'cli'; $eventDispatcher = $container->get('event_dispatcher'); $eventDispatcher->dispatch(MVCEvents::CONFIG_SCOPE_CHANGE, new ScopeChangeEvent($siteAccess)); }
protected function registerCommands() { parent::registerCommands(); $container = $this->getKernel()->getContainer(); $this->siteAccessName = $this->siteAccessName ?: $container->getParameter('ezpublish.siteaccess.default'); $siteAccess = new SiteAccess($this->siteAccessName, 'cli'); $container->set('ezpublish.siteaccess', $siteAccess); // Replacing legacy kernel handler web by the CLI one // @todo: this should be somewhat done in the legacy bundle $legacyHandlerCLI = $container->get('ezpublish_legacy.kernel_handler.cli'); $container->set('ezpublish_legacy.kernel.lazy', null); $container->set('ezpublish_legacy.kernel_handler', $legacyHandlerCLI); $container->set('ezpublish_legacy.kernel_handler.web', $legacyHandlerCLI); }
protected function registerCommands() { if ($this->kernel->getContainer()->getParameter('installed') !== true) { // composer is called, the system may not be installed yet return parent::registerCommands(); } // ensure that we have admin access $this->bootstrap(); if ($this->kernel->getContainer()->getParameter('installed') === true) { // don't attempt to login if the Core needs an upgrade \Zikula_Core::defineCurrentInstalledCoreVersion($this->kernel->getContainer()); if (defined('ZIKULACORE_CURRENT_INSTALLED_VERSION') && version_compare(ZIKULACORE_CURRENT_INSTALLED_VERSION, \Zikula_Core::VERSION_NUM, '==')) { try { $this->loginAsAdministrator(); } catch (\Exception $e) { $output = new \Symfony\Component\Console\Output\ConsoleOutput(); $this->renderException($e, $output); } } } return parent::registerCommands(); }
/** * {@inheritdoc} */ protected function registerCommands() { //if ($this->getKernel()->getEnvironment() != 'prod') { parent::registerCommands(); //} }