‪TYPO3CMS  ‪main
TestController.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
20 use Psr\Http\Message\ResponseInterface;
27 use TYPO3Fluid\Fluid\View\ViewInterface;
29 
34 {
35  public ‪$view;
37  public string ‪$actionMethodName;
39 
40  public function ‪getArguments(): ‪Arguments
41  {
42  return ‪$this->arguments;
43  }
44 
45  public function ‪renderAssetsForRequest(‪$request): void
46  {
47  parent::renderAssetsForRequest(‪$request);
48  }
49 
50  public function ‪initializeActionMethodArguments(): void
51  {
52  parent::initializeActionMethodArguments();
53  }
54 
55  public function ‪setViewConfiguration(ViewInterface ‪$view): void
56  {
57  parent::setViewConfiguration(‪$view);
58  }
59 
61  {
62  return parent::getFlashMessageQueue(‪$identifier);
63  }
64 
65  public function ‪initializeFooAction(): void
66  {
67  $propertyMappingConfiguration = $this->arguments['fooParam']->getPropertyMappingConfiguration();
68  $propertyMappingConfiguration->allowAllProperties();
69  $propertyMappingConfiguration->setTypeConverterOption(
70  PersistentObjectConverter::class,
72  true
73  );
74  }
75 
76  public function ‪fooAction(‪Model $fooParam): ResponseInterface
77  {
78  return $this->‪htmlResponse('');
79  }
80 
84  public function ‪barAction(string $barParam): ResponseInterface
85  {
86  return $this->‪htmlResponse('');
87  }
88 
92  public function ‪bazAction(array $bazParam): ResponseInterface
93  {
94  return $this->‪htmlResponse('');
95  }
96 
97  public function ‪quxAction(): ResponseInterface
98  {
99  return $this->‪htmlResponse('');
100  }
101 
102  public function ‪initializeActionMethodArgumentsTestActionOne(string $stringArgument, int $integerArgument, \stdClass $objectArgument): ResponseInterface
103  {
104  return $this->‪htmlResponse('');
105  }
106 
107  public function ‪initializeActionMethodArgumentsTestActionTwo(string $arg1, array $arg2 = [21], string $arg3 = 'foo'): ResponseInterface
108  {
109  return $this->‪htmlResponse('');
110  }
111 
112  public function ‪initializeActionMethodArgumentsTestActionThree($arg1): ResponseInterface
113  {
114  return $this->‪htmlResponse('');
115  }
116 }
‪TYPO3\CMS\Extbase\Annotation
Definition: IgnoreValidation.php:18
‪TYPO3Tests\ActionControllerTest\Controller\TestController
Definition: TestController.php:34
‪TYPO3Tests\ActionControllerTest\Controller\TestController\quxAction
‪quxAction()
Definition: TestController.php:97
‪TYPO3Tests\ActionControllerTest\Controller\TestController\renderAssetsForRequest
‪renderAssetsForRequest($request)
Definition: TestController.php:45
‪TYPO3\CMS\Extbase\Mvc\Controller\Arguments
Definition: Arguments.php:29
‪TYPO3Tests\ActionControllerTest\Controller\TestController\$arguments
‪Arguments $arguments
Definition: TestController.php:36
‪TYPO3Tests\ActionControllerTest\Controller\TestController\initializeActionMethodArgumentsTestActionTwo
‪initializeActionMethodArgumentsTestActionTwo(string $arg1, array $arg2=[21], string $arg3='foo')
Definition: TestController.php:107
‪TYPO3Tests\ActionControllerTest\Controller\TestController\initializeActionMethodArguments
‪initializeActionMethodArguments()
Definition: TestController.php:50
‪TYPO3Tests\ActionControllerTest\Controller\TestController\$request
‪RequestInterface $request
Definition: TestController.php:38
‪TYPO3Tests\ActionControllerTest\Controller\TestController\initializeFooAction
‪initializeFooAction()
Definition: TestController.php:65
‪TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter\CONFIGURATION_CREATION_ALLOWED
‪const CONFIGURATION_CREATION_ALLOWED
Definition: PersistentObjectConverter.php:53
‪TYPO3Tests\ActionControllerTest\Domain\Model\Model
Definition: Model.php:26
‪TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter
Definition: PersistentObjectConverter.php:44
‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController\htmlResponse
‪htmlResponse(string $html=null)
Definition: ActionController.php:806
‪TYPO3Tests\ActionControllerTest\Controller\TestController\fooAction
‪fooAction(Model $fooParam)
Definition: TestController.php:76
‪TYPO3Tests\ActionControllerTest\Controller\TestController\setViewConfiguration
‪setViewConfiguration(ViewInterface $view)
Definition: TestController.php:55
‪TYPO3Tests\ActionControllerTest\Controller\TestController\$actionMethodName
‪string $actionMethodName
Definition: TestController.php:37
‪TYPO3Tests\ActionControllerTest\Controller\TestController\bazAction
‪bazAction(array $bazParam)
Definition: TestController.php:92
‪TYPO3Tests\ActionControllerTest\Controller\TestController\$view
‪$view
Definition: TestController.php:35
‪TYPO3Tests\ActionControllerTest\Controller\TestController\getArguments
‪getArguments()
Definition: TestController.php:40
‪TYPO3\CMS\Extbase\Mvc\RequestInterface
Definition: RequestInterface.php:24
‪TYPO3Tests\ActionControllerTest\Controller\TestController\initializeActionMethodArgumentsTestActionOne
‪initializeActionMethodArgumentsTestActionOne(string $stringArgument, int $integerArgument, \stdClass $objectArgument)
Definition: TestController.php:102
‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController
Definition: ActionController.php:63
‪TYPO3Tests\ActionControllerTest\Controller
Definition: TestController.php:18
‪TYPO3Tests\ActionControllerTest\Controller\TestController\getFlashMessageQueue
‪getFlashMessageQueue(string $identifier=null)
Definition: TestController.php:60
‪TYPO3Tests\ActionControllerTest\Controller\TestController\barAction
‪barAction(string $barParam)
Definition: TestController.php:84
‪TYPO3Tests\ActionControllerTest\Controller\TestController\initializeActionMethodArgumentsTestActionThree
‪initializeActionMethodArgumentsTestActionThree($arg1)
Definition: TestController.php:112
‪TYPO3\CMS\Core\Messaging\FlashMessageQueue
Definition: FlashMessageQueue.php:29
‪TYPO3\CMS\Webhooks\Message\$identifier
‪identifier readonly string $identifier
Definition: FileAddedMessage.php:37