Datetime, * 'stats' => [ * status => count, * ... * ] * 'results' => [ * organization_id => status, * ... * ] * ] * * * @param bool $fullScan If true, a 'warnings' entry will be added to the result of each site status, * and a full scan of the website pages will be performed. * @return array */ public function scanAllAction(bool $fullScan = false): array { $organizationRepository = GeneralUtility::makeInstance(ObjectManager::class)->get(OrganizationRepository::class); $siteController = GeneralUtility::makeInstance(ObjectManager::class)->get(SiteController::class); $results = []; $stats = []; $organizationsCollection = $organizationRepository->getAll(); foreach ($organizationsCollection->getMembers() as $organization) { $status = $siteController->getSiteStatusAction($organization->getId(), $fullScan); $results[$organization->getId()] = $status; if (!isset($stats[$status['status']])) { $stats[$status['status']] = 0; } $stats[$status['status']] += 1; } return [ 'date' => new \DateTime(), 'stats' => $stats, 'results' => $results ]; } }