1 | <?php |
||
27 | abstract class AbstractController extends ActionController |
||
28 | { |
||
29 | /** |
||
30 | * The index repository. |
||
31 | * |
||
32 | * @var \HDNET\Calendarize\Domain\Repository\IndexRepository |
||
33 | */ |
||
34 | protected $indexRepository; |
||
35 | |||
36 | public function injectIndexRepository(IndexRepository $indexRepository) |
||
40 | |||
41 | /** |
||
42 | * The feed formats and content types. |
||
43 | * |
||
44 | * @var array |
||
45 | */ |
||
46 | protected $feedFormats = [ |
||
47 | 'ics' => 'text/calendar', |
||
48 | 'xml' => 'application/xml', |
||
49 | 'atom' => 'application/rss+xml', |
||
50 | ]; |
||
51 | |||
52 | /** |
||
53 | * Inject the configuration manager. |
||
54 | * |
||
55 | * @param ConfigurationManagerInterface $configurationManager |
||
56 | */ |
||
57 | public function injectConfigurationManager(ConfigurationManagerInterface $configurationManager) |
||
67 | |||
68 | /** |
||
69 | * Init all actions. |
||
70 | */ |
||
71 | public function initializeAction() |
||
76 | |||
77 | /** |
||
78 | * Calls the specified action method and passes the arguments. |
||
79 | * |
||
80 | * If the action returns a string, it is appended to the content in the |
||
81 | * response object. If the action doesn't return anything and a valid |
||
82 | * view exists, the view is rendered automatically. |
||
83 | * |
||
84 | * @api |
||
85 | */ |
||
86 | protected function callActionMethod() |
||
102 | |||
103 | /** |
||
104 | * Send the content type header and the right file extension in front of the content. |
||
105 | * |
||
106 | * @param $contentType |
||
107 | * @param $fileExtension |
||
108 | */ |
||
109 | protected function sendHeaderAndFilename($contentType, $fileExtension) |
||
121 | |||
122 | /** |
||
123 | * Extend the view by the slot class and name and assign the variable to the view. |
||
124 | * |
||
125 | * @param array $variables |
||
126 | * @param string $signalClassName |
||
127 | * @param string $signalName |
||
128 | */ |
||
129 | protected function slotExtendedAssignMultiple(array $variables, $signalClassName, $signalName) |
||
142 | |||
143 | /** |
||
144 | * Return the controllerName, pluginName and actionName. |
||
145 | * |
||
146 | * @return string |
||
147 | */ |
||
148 | protected function getStringForPluginHmac(): string |
||
156 | |||
157 | /** |
||
158 | * Calculate the plugin Hmac. |
||
159 | * |
||
160 | * @see \TYPO3\CMS\Extbase\Security\Cryptography\HashService::generateHmac() |
||
161 | * |
||
162 | * @return string $hmac |
||
163 | */ |
||
164 | protected function calculatePluginHmac() |
||
174 | |||
175 | /** |
||
176 | * \TYPO3\CMS\Extbase\Security\Cryptography\HashService::validateHmac(). |
||
177 | * |
||
178 | * @param string $hmac |
||
179 | * |
||
180 | * @return bool |
||
181 | */ |
||
182 | protected function validatePluginHmac(string $hmac): bool |
||
191 | |||
192 | /** |
||
193 | * Check if the static template is included. |
||
194 | */ |
||
195 | protected function checkStaticTemplateIsIncluded() |
||
205 | |||
206 | /** |
||
207 | * Change the page title. |
||
208 | * |
||
209 | * @param string $title |
||
210 | */ |
||
211 | protected function changePageTitle($title) |
||
218 | } |
||
219 |