TYPO3 CMS  TYPO3_6-2
Configuration.php
Go to the documentation of this file.
1 <?php
3 
18 
23 
28  protected $featureManager;
29 
34  protected $configurationManager = NULL;
35 
41  protected function executeAction() {
42  $actionMessages = array();
43  if (isset($this->postValues['set']['activate'])) {
44  $actionMessages[] = $this->activate();
45  $this->activate();
46  }
47  $this->view->assign('actionMessages', $actionMessages);
48 
49  $postValues = is_array($this->postValues['values']) ? $this->postValues['values'] : array();
50  $this->view->assign('features', $this->featureManager->getInitializedFeatures($postValues));
51 
52  return $this->view->render();
53  }
54 
60  protected function activate() {
61  $configurationValues = $this->featureManager->getConfigurationForSelectedFeaturePresets($this->postValues['values']);
62 
63  if (count($configurationValues) > 0) {
64  $this->configurationManager->setLocalConfigurationValuesByPathValuePairs($configurationValues);
66  $message = $this->objectManager->get('TYPO3\\CMS\\Install\\Status\\OkStatus');
67  $message->setTitle('Configuration written');
68  $messageBody = array();
69  foreach ($configurationValues as $configurationKey => $configurationValue) {
70  $messageBody[] = '\'' . $configurationKey . '\' => \'' . $configurationValue . '\'';
71  }
72  $message->setMessage(implode(LF, $messageBody));
73  } else {
75  $message = $this->objectManager->get('TYPO3\\CMS\\Install\\Status\\InfoStatus');
76  $message->setTitle('No configuration change selected');
77  }
78  return $message;
79  }
80 }