TYPO3 CMS  TYPO3_6-2
FolderStatus.php
Go to the documentation of this file.
1 <?php
3 
21 
27  protected function executeAction() {
28  // Count of folder structure errors are displayed in left navigation menu
30  $folderStructureFacade = $this->objectManager->get('TYPO3\\CMS\\Install\\FolderStructure\\DefaultFactory')->getStructure();
31  $folderStatus = $folderStructureFacade->getStatus();
32 
34  $permissionCheck = $this->objectManager->get('TYPO3\\CMS\\Install\\FolderStructure\\DefaultPermissionsCheck');
35  $folderStatus[] = $permissionCheck->getMaskStatus('fileCreateMask');
36  $folderStatus[] = $permissionCheck->getMaskStatus('folderCreateMask');
37 
39  $statusUtility = $this->objectManager->get('TYPO3\\CMS\\Install\\Status\\StatusUtility');
40 
41  $folderStructureErrors = array_merge(
42  $statusUtility->filterBySeverity($folderStatus, 'error'),
43  $statusUtility->filterBySeverity($folderStatus, 'warning')
44  );
45 
46  return count($folderStructureErrors);
47  }
48 }