/** * Execute the Command. * * @param $input InputInterface * @param $output OutputInterface */ protected function execute(InputInterface $input, OutputInterface $output) { if ($input->getOption('list-info-collectors')) { $output->writeln('Available info collectors:', true); foreach ($this->systemInfoCollectorRegistry->getIdentifiers() as $identifier) { $output->writeln(" {$identifier}", true); } return; } $outputFormatter = $this->outputFormatRegistry->getItem($input->getOption('format')); if ($input->getArgument('info-collectors')) { $identifiers = $input->getArgument('info-collectors'); } else { $identifiers = $this->systemInfoCollectorRegistry->getIdentifiers(); } // Collect info for the given identifiers. $collectedInfoArray = []; foreach ($identifiers as $identifier) { $collectedInfoArray[$identifier] = $this->systemInfoCollectorRegistry->getItem($identifier)->collect(); } $output->writeln($outputFormatter->format($collectedInfoArray)); }
/** * Renders the system information page. * * @return \Symfony\Component\HttpFoundation\Response */ public function infoAction() { return $this->render('eZPlatformUIBundle:SystemInfo:info.html.twig', ['collector_identifiers' => $this->collectorRegistry->getIdentifiers()]); }
/** * @param string $identifier A SystemInfo collector identifier (php, hardware...) * * @return \EzSystems\EzSupportToolsBundle\SystemInfo\Collector\SystemInfoCollector */ private function getCollector($identifier) { return $this->registry->getItem($identifier); }