TYPO3 CMS  TYPO3_6-2
EnvironmentStatusReport.php
Go to the documentation of this file.
1 <?php
3 
23 
30  public function getStatus() {
32  $statusCheck = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Install\\SystemEnvironment\\Check');
33  $statusObjects = $statusCheck->getStatus();
34 
35  $reportStatusTypes = array(
36  'error' => array(),
37  'warning' => array(),
38  'ok' => array(),
39  'information' => array(),
40  'notice' => array(),
41  );
42 
44  foreach ($statusObjects as $statusObject) {
45  $severityIdentifier = $statusObject->getSeverity();
46  if (empty($severityIdentifier) || !is_array($reportStatusTypes[$severityIdentifier])) {
47  throw new \TYPO3\CMS\Install\Exception('Unknown reports severity type', 1362602560);
48  }
49  $reportStatusTypes[$severityIdentifier][] = $statusObject;
50  }
51 
52  $statusArray = array();
53  foreach ($reportStatusTypes as $type => $statusObjects) {
54  $value = count($statusObjects);
55  if ($value > 0) {
56  $pathToXliff = 'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf';
57  // Map information type to abbreviation which is used in \TYPO3\CMS\Reports\Status class
58  if ($type === 'information') {
59  $type = 'info';
60  }
61  $message = $GLOBALS['LANG']->sL($pathToXliff . ':environment.status.message.' . $type);
62  $severity = constant('\TYPO3\CMS\Reports\Status::' . strtoupper($type));
64  'TYPO3\\CMS\\Reports\\Status',
65  $GLOBALS['LANG']->sL($pathToXliff . ':environment.status.title'),
66  sprintf($GLOBALS['LANG']->sL($pathToXliff . ':environment.status.value'), $value),
67  $message,
68  $severity
69  );
70  }
71  }
72 
73  return $statusArray;
74  }
75 }
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]