/** * @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); }
/** * Builds a TypoLink configuration array from the current settings * * @return array typolink configuration array * @see TSref/typolink */ protected function buildTypolinkConfiguration() { $typolinkConfiguration = array(); $typolinkConfiguration['parameter'] = $this->targetPageUid !== null ? $this->targetPageUid : $GLOBALS['TSFE']->id; if ($this->targetPageType !== 0) { $typolinkConfiguration['parameter'] .= ',' . $this->targetPageType; } elseif ($this->format !== '') { $targetPageType = $this->extensionService->getTargetPageTypeByFormat($this->request->getControllerExtensionName(), $this->format); $typolinkConfiguration['parameter'] .= ',' . $targetPageType; } if (!empty($this->arguments)) { $arguments = $this->convertDomainObjectsToIdentityArrays($this->arguments); $this->lastArguments = $arguments; $typolinkConfiguration['additionalParams'] = GeneralUtility::implodeArrayForUrl(null, $arguments); } if ($this->addQueryString === true) { $typolinkConfiguration['addQueryString'] = 1; if (!empty($this->argumentsToBeExcludedFromQueryString)) { $typolinkConfiguration['addQueryString.'] = array('exclude' => implode(',', $this->argumentsToBeExcludedFromQueryString)); } if ($this->addQueryStringMethod) { $typolinkConfiguration['addQueryString.']['method'] = $this->addQueryStringMethod; } } if ($this->noCache === true) { $typolinkConfiguration['no_cache'] = 1; } elseif ($this->useCacheHash) { $typolinkConfiguration['useCacheHash'] = 1; } if ($this->section !== '') { $typolinkConfiguration['section'] = $this->section; } if ($this->linkAccessRestrictedPages === true) { $typolinkConfiguration['linkAccessRestrictedPages'] = 1; } return $typolinkConfiguration; }
/** * Determines the fully qualified view object name. * * @return mixed The fully qualified view object name or FALSE if no matching view could be found. * @api */ protected function resolveViewObjectName() { $vendorName = $this->request->getControllerVendorName(); if ($vendorName !== NULL) { $possibleViewName = str_replace('@vendor', $vendorName, $this->namespacesViewObjectNamePattern); } else { $possibleViewName = $this->viewObjectNamePattern; } $possibleViewName = str_replace(array('@extension', '@controller', '@action'), array($this->request->getControllerExtensionName(), $this->request->getControllerName(), ucfirst($this->request->getControllerActionName())), $possibleViewName); $format = $this->request->getFormat(); $viewObjectName = str_replace('@format', ucfirst($format), $possibleViewName); if (class_exists($viewObjectName) === FALSE) { $viewObjectName = str_replace('@format', '', $possibleViewName); } if (isset($this->viewFormatToObjectNameMap[$format]) && class_exists($viewObjectName) === FALSE) { $viewObjectName = $this->viewFormatToObjectNameMap[$format]; } return class_exists($viewObjectName) ? $viewObjectName : FALSE; }
/** * Determines the fully qualified view object name. * * @return mixed The fully qualified view object name or FALSE if no matching view could be found. * @api */ protected function resolveViewObjectName() { $vendorName = $this->request->getControllerVendorName(); if ($vendorName === null) { return false; } $possibleViewName = str_replace(['@vendor', '@extension', '@controller', '@action'], [$vendorName, $this->request->getControllerExtensionName(), $this->request->getControllerName(), ucfirst($this->request->getControllerActionName())], $this->namespacesViewObjectNamePattern); $format = $this->request->getFormat(); $viewObjectName = str_replace('@format', ucfirst($format), $possibleViewName); if (class_exists($viewObjectName) === false) { $viewObjectName = str_replace('@format', '', $possibleViewName); } if (isset($this->viewFormatToObjectNameMap[$format]) && class_exists($viewObjectName) === false) { $viewObjectName = $this->viewFormatToObjectNameMap[$format]; } return class_exists($viewObjectName) ? $viewObjectName : false; }