TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
FolderStructure.php
Go to the documentation of this file.
1 <?php
2 namespace TYPO3\CMS\Install\Controller\Action\Tool;
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
18 use TYPO3\CMS\Install\Controller\Action;
19 
24 {
30  protected function executeAction()
31  {
33  $folderStructureFactory = GeneralUtility::makeInstance(\TYPO3\CMS\Install\FolderStructure\DefaultFactory::class);
34  $structureFacade = $folderStructureFactory->getStructure();
35 
36  $fixedStatusObjects = [];
37  if (isset($this->postValues['set']['fix'])) {
38  $fixedStatusObjects = $structureFacade->fix();
39  }
40 
41  $statusObjects = $structureFacade->getStatus();
43  $statusUtility = GeneralUtility::makeInstance(\TYPO3\CMS\Install\Status\StatusUtility::class);
44 
45  $errorStatus = array_merge(
46  $statusUtility->filterBySeverity($statusObjects, 'error'),
47  $statusUtility->filterBySeverity($statusObjects, 'warning')
48  );
49  $okStatus = array_merge(
50  $statusUtility->filterBySeverity($statusObjects, 'notice'),
51  $statusUtility->filterBySeverity($statusObjects, 'information'),
52  $statusUtility->filterBySeverity($statusObjects, 'ok')
53  );
54 
56  $permissionCheck = GeneralUtility::makeInstance(\TYPO3\CMS\Install\FolderStructure\DefaultPermissionsCheck::class);
57  $filePermissionStatus = $permissionCheck->getMaskStatus('fileCreateMask');
58  $directoryPermissionStatus = $permissionCheck->getMaskStatus('folderCreateMask');
59 
60  $this->view
61  ->assign('filePermissionStatus', $filePermissionStatus)
62  ->assign('directoryPermissionStatus', $directoryPermissionStatus)
63  ->assign('fixedStatus', $fixedStatusObjects)
64  ->assign('errorStatus', $errorStatus)
65  ->assign('okStatus', $okStatus);
66 
67  return $this->view->render();
68  }
69 }
static makeInstance($className,...$constructorArguments)