/** * 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; }