TYPO3 CMS  TYPO3_6-2
ContextService.php
Go to the documentation of this file.
1 <?php
3 
20 
24  private $backendContext = FALSE;
25 
29  public function __construct() {
30  $formValues = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('install');
31  if (isset($formValues['context'])) {
32  $this->backendContext = ($formValues['context'] === 'backend');
33  }
34  }
35 
41  public function isBackendContext() {
42  return $this->backendContext;
43  }
44 
50  public function isStandaloneContext() {
51  return !$this->backendContext;
52  }
53 
59  public function getContextString() {
60  return ( $this->isBackendContext() ? 'backend' : 'standalone' );
61  }
62 }