‪TYPO3CMS  9.5
ControllerContext.php
Go to the documentation of this file.
1 <?php
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 
21 {
25  protected ‪$request;
26 
30  protected ‪$response;
31 
35  protected ‪$arguments;
36 
40  protected ‪$uriBuilder;
41 
46 
50  protected ‪$flashMessageService;
51 
55  protected ‪$extensionService;
56 
60  public function ‪injectFlashMessageService(\‪TYPO3\CMS\Core\Messaging\FlashMessageService ‪$flashMessageService)
61  {
62  $this->flashMessageService = ‪$flashMessageService;
63  }
64 
68  public function ‪injectExtensionService(\‪TYPO3\CMS\‪Extbase\Service\ExtensionService ‪$extensionService)
69  {
70  $this->extensionService = ‪$extensionService;
71  }
72 
78  public function ‪setRequest(\‪TYPO3\CMS\‪Extbase\Mvc\‪Request ‪$request)
79  {
80  $this->request = ‪$request;
81  }
82 
88  public function ‪getRequest()
89  {
90  return ‪$this->request;
91  }
92 
99  {
100  $this->response = ‪$response;
101  }
102 
108  public function ‪getResponse()
109  {
110  return ‪$this->response;
111  }
112 
118  public function ‪setArguments(\‪TYPO3\CMS\‪Extbase\Mvc\Controller\‪Arguments ‪$arguments)
119  {
120  $this->arguments = ‪$arguments;
121  }
122 
128  public function ‪getArguments()
129  {
130  return ‪$this->arguments;
131  }
132 
136  public function ‪setUriBuilder(\‪TYPO3\CMS\‪Extbase\Mvc\Web\Routing\UriBuilder ‪$uriBuilder)
137  {
138  $this->uriBuilder = ‪$uriBuilder;
139  }
140 
144  public function ‪getUriBuilder()
145  {
147  }
148 
153  public function ‪getFlashMessageQueue($identifier = null)
154  {
155  if ($identifier === null) {
156  if ($this->flashMessageQueueDefaultIdentifier === null) {
157  // cache the default-identifier for performance-reasons
158  $this->flashMessageQueueDefaultIdentifier = 'extbase.flashmessages.' . $this->extensionService->getPluginNamespace($this->request->getControllerExtensionName(), $this->request->getPluginName());
159  }
161  }
162  return $this->flashMessageService->getMessageQueueByIdentifier($identifier);
163  }
164 }
‪TYPO3\CMS\Extbase\Annotation
Definition: IgnoreValidation.php:4
‪TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext\$arguments
‪TYPO3 CMS Extbase Mvc Controller Arguments $arguments
Definition: ControllerContext.php:32
‪TYPO3
‪TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext\getUriBuilder
‪TYPO3 CMS Extbase Mvc Web Routing UriBuilder getUriBuilder()
Definition: ControllerContext.php:137
‪TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext\setUriBuilder
‪setUriBuilder(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder $uriBuilder)
Definition: ControllerContext.php:129
‪TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext
Definition: ControllerContext.php:21
‪TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext\setRequest
‪setRequest(\TYPO3\CMS\Extbase\Mvc\Request $request)
Definition: ControllerContext.php:71
‪TYPO3\CMS\Extbase\Mvc\Controller\Arguments
Definition: Arguments.php:22
‪TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext\$request
‪TYPO3 CMS Extbase Mvc Request $request
Definition: ControllerContext.php:24
‪TYPO3\CMS\Extbase\Mvc\Controller
Definition: AbstractController.php:2
‪TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext\$flashMessageService
‪TYPO3 CMS Core Messaging FlashMessageService $flashMessageService
Definition: ControllerContext.php:44
‪TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext\$extensionService
‪TYPO3 CMS Extbase Service ExtensionService $extensionService
Definition: ControllerContext.php:48
‪TYPO3\CMS\Extbase\Mvc\Cli\Request
Definition: Request.php:23
‪TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext\setResponse
‪setResponse(\TYPO3\CMS\Extbase\Mvc\Response $response)
Definition: ControllerContext.php:91
‪TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext\$flashMessageQueueDefaultIdentifier
‪string $flashMessageQueueDefaultIdentifier
Definition: ControllerContext.php:40
‪TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext\getRequest
‪TYPO3 CMS Extbase Mvc Request getRequest()
Definition: ControllerContext.php:81
‪TYPO3\CMS\Extbase\Mvc\Cli\Response
Definition: Response.php:23
‪TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext\getResponse
‪TYPO3 CMS Extbase Mvc Response getResponse()
Definition: ControllerContext.php:101
‪TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext\getFlashMessageQueue
‪TYPO3 CMS Core Messaging FlashMessageQueue getFlashMessageQueue($identifier=null)
Definition: ControllerContext.php:146
‪TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext\injectExtensionService
‪injectExtensionService(\TYPO3\CMS\Extbase\Service\ExtensionService $extensionService)
Definition: ControllerContext.php:61
‪TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext\setArguments
‪setArguments(\TYPO3\CMS\Extbase\Mvc\Controller\Arguments $arguments)
Definition: ControllerContext.php:111
‪TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext\$response
‪TYPO3 CMS Extbase Mvc Response $response
Definition: ControllerContext.php:28
‪TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext\$uriBuilder
‪TYPO3 CMS Extbase Mvc Web Routing UriBuilder $uriBuilder
Definition: ControllerContext.php:36
‪TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext\injectFlashMessageService
‪injectFlashMessageService(\TYPO3\CMS\Core\Messaging\FlashMessageService $flashMessageService)
Definition: ControllerContext.php:53
‪TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext\getArguments
‪TYPO3 CMS Extbase Mvc Controller Arguments getArguments()
Definition: ControllerContext.php:121