get(OrganizationRepository::class); $siteController = GeneralUtility::makeInstance(ObjectManager::class)->get(SiteController::class); $report = new ScanReport(); $organizationsCollection = $organizationRepository->getAll(); $i = 0; $total = count($organizationsCollection->getMembers()); foreach ($organizationsCollection->getMembers() as $organization) { $i++; $status = $siteController->getSiteStatusAction($organization->getId(), $fullScan); $report->setResultFor($organization->getId(), $status); if ($progressCallback !== null) { $progressCallback($i, $total); } } return $report; } }