/** * @return \TYPO3\CMS\Core\Messaging\FlashMessageQueue * @api */ public function getFlashMessageQueue() { if (!$this->flashMessageQueue instanceof \TYPO3\CMS\Core\Messaging\FlashMessageQueue) { $this->flashMessageQueue = $this->flashMessageService->getMessageQueueByIdentifier('extbase.flashmessages.' . $this->extensionService->getPluginNamespace($this->request->getControllerExtensionName(), $this->request->getPluginName())); } return $this->flashMessageQueue; }
/** * @param string $identifier Queue-identifier * @return \TYPO3\CMS\Core\Messaging\FlashMessageQueue * @api */ public function getFlashMessageQueue($identifier = null) { if ($identifier === null) { if ($this->flashMessageQueueDefaultIdentifier === null) { // cache the default-identifier for performance-reasons $this->flashMessageQueueDefaultIdentifier = 'extbase.flashmessages.' . $this->extensionService->getPluginNamespace($this->request->getControllerExtensionName(), $this->request->getPluginName()); } $identifier = $this->flashMessageQueueDefaultIdentifier; } return $this->flashMessageService->getMessageQueueByIdentifier($identifier); }
/** * Creates an URI used for linking to an Extbase action. * Works in Frontend and Backend mode of TYPO3. * * @param string $actionName Name of the action to be called * @param array $controllerArguments Additional query parameters. Will be "namespaced" and merged with $this->arguments. * @param string $controllerName Name of the target controller. If not set, current ControllerName is used. * @param string $extensionName Name of the target extension, without underscores. If not set, current ExtensionName is used. * @param string $pluginName Name of the target plugin. If not set, current PluginName is used. * @return string the rendered URI * @api * @see build() */ public function uriFor($actionName = NULL, $controllerArguments = array(), $controllerName = NULL, $extensionName = NULL, $pluginName = NULL) { if ($actionName !== NULL) { $controllerArguments['action'] = $actionName; } if ($controllerName !== NULL) { $controllerArguments['controller'] = $controllerName; } else { $controllerArguments['controller'] = $this->request->getControllerName(); } if ($extensionName === NULL) { $extensionName = $this->request->getControllerExtensionName(); } if ($pluginName === NULL && $this->environmentService->isEnvironmentInFrontendMode()) { $pluginName = $this->extensionService->getPluginNameByAction($extensionName, $controllerArguments['controller'], $controllerArguments['action']); } if ($pluginName === NULL) { $pluginName = $this->request->getPluginName(); } $this->disableCacheHashForNonCacheableAction($controllerArguments); if ($this->environmentService->isEnvironmentInFrontendMode() && $this->configurationManager->isFeatureEnabled('skipDefaultArguments')) { $controllerArguments = $this->removeDefaultControllerAndAction($controllerArguments, $extensionName, $pluginName); } if ($this->targetPageUid === NULL && $this->environmentService->isEnvironmentInFrontendMode()) { $this->targetPageUid = $this->extensionService->getTargetPidByPlugin($extensionName, $pluginName); } if ($this->format !== '') { $controllerArguments['format'] = $this->format; } if ($this->argumentPrefix !== NULL) { $prefixedControllerArguments = array($this->argumentPrefix => $controllerArguments); } else { $pluginNamespace = $this->extensionService->getPluginNamespace($extensionName, $pluginName); $prefixedControllerArguments = array($pluginNamespace => $controllerArguments); } ArrayUtility::mergeRecursiveWithOverrule($this->arguments, $prefixedControllerArguments); return $this->build(); }