TYPO3 CMS  TYPO3_6-2
ControllerContext.php
Go to the documentation of this file.
1 <?php
3 
23 
27  protected $request;
28 
32  protected $response;
33 
37  protected $arguments;
38 
44 
48  protected $uriBuilder;
49 
54 
58  protected $flashMessageQueue;
59 
65 
71 
76  protected $extensionService;
77 
84  public function setRequest(\TYPO3\CMS\Extbase\Mvc\Request $request) {
85  $this->request = $request;
86  }
87 
94  public function getRequest() {
95  return $this->request;
96  }
97 
104  public function setResponse(\TYPO3\CMS\Extbase\Mvc\Response $response) {
105  $this->response = $response;
106  }
107 
114  public function getResponse() {
115  return $this->response;
116  }
117 
124  public function setArguments(\TYPO3\CMS\Extbase\Mvc\Controller\Arguments $arguments) {
125  $this->arguments = $arguments;
126  }
127 
134  public function getArguments() {
135  return $this->arguments;
136  }
137 
145  public function setArgumentsMappingResults(\TYPO3\CMS\Extbase\Property\MappingResults $argumentsMappingResults) {
146  $this->argumentsMappingResults = $argumentsMappingResults;
147  }
148 
156  public function getArgumentsMappingResults() {
158  }
159 
164  public function setUriBuilder(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder $uriBuilder) {
165  $this->uriBuilder = $uriBuilder;
166  }
167 
172  public function getUriBuilder() {
173  return $this->uriBuilder;
174  }
175 
183  public function setFlashMessageContainer(\TYPO3\CMS\Extbase\Mvc\Controller\FlashMessageContainer $flashMessageContainer) {
184  $this->flashMessageContainer = $flashMessageContainer;
185  $flashMessageContainer->setControllerContext($this);
186  }
187 
194  public function getFlashMessageContainer() {
197  }
198 
203  public function getFlashMessageQueue() {
204  if (!$this->flashMessageQueue instanceof \TYPO3\CMS\Core\Messaging\FlashMessageQueue) {
205  if ($this->useLegacyFlashMessageHandling()) {
206  $this->flashMessageQueue = $this->flashMessageService->getMessageQueueByIdentifier();
207  } else {
208  $this->flashMessageQueue = $this->flashMessageService->getMessageQueueByIdentifier(
209  'extbase.flashmessages.' . $this->extensionService->getPluginNamespace($this->request->getControllerExtensionName(), $this->request->getPluginName())
210  );
211  }
212  }
213 
215  }
216 
221  public function useLegacyFlashMessageHandling() {
223  $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK),
224  'legacy.enableLegacyFlashMessageHandling'
225  );
226  }
227 }
setUriBuilder(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder $uriBuilder)
setRequest(\TYPO3\CMS\Extbase\Mvc\Request $request)
setResponse(\TYPO3\CMS\Extbase\Mvc\Response $response)
setArgumentsMappingResults(\TYPO3\CMS\Extbase\Property\MappingResults $argumentsMappingResults)
static getPropertyPath($subject, $propertyPath)
setArguments(\TYPO3\CMS\Extbase\Mvc\Controller\Arguments $arguments)
setFlashMessageContainer(\TYPO3\CMS\Extbase\Mvc\Controller\FlashMessageContainer $flashMessageContainer)