/** * Builds the URI, backend flavour * The resulting URI is relative and starts with "mod.php". * The settings pageUid, pageType, noCache, useCacheHash & linkAccessRestrictedPages * will be ignored in the backend. * * @return string The URI */ public function buildBackendUri() { if ($this->addQueryString === TRUE) { if ($this->addQueryStringMethod) { switch ($this->addQueryStringMethod) { case 'GET': $arguments = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET(); break; case 'POST': $arguments = \TYPO3\CMS\Core\Utility\GeneralUtility::_POST(); break; case 'GET,POST': $arguments = array_replace_recursive(\TYPO3\CMS\Core\Utility\GeneralUtility::_GET(), \TYPO3\CMS\Core\Utility\GeneralUtility::_POST()); break; case 'POST,GET': $arguments = array_replace_recursive(\TYPO3\CMS\Core\Utility\GeneralUtility::_POST(), \TYPO3\CMS\Core\Utility\GeneralUtility::_GET()); break; default: $arguments = \TYPO3\CMS\Core\Utility\GeneralUtility::explodeUrl2Array(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('QUERY_STRING'), TRUE); } } else { $arguments = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET(); } foreach ($this->argumentsToBeExcludedFromQueryString as $argumentToBeExcluded) { $argumentToBeExcluded = \TYPO3\CMS\Core\Utility\GeneralUtility::explodeUrl2Array($argumentToBeExcluded, TRUE); $arguments = \TYPO3\CMS\Core\Utility\GeneralUtility::arrayDiffAssocRecursive($arguments, $argumentToBeExcluded); } } else { $arguments = array('M' => \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('M'), 'id' => \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id')); } \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($arguments, $this->arguments); $arguments = $this->convertDomainObjectsToIdentityArrays($arguments); $this->lastArguments = $arguments; $moduleName = $arguments['M']; unset($arguments['M'], $arguments['moduleToken']); $uri = BackendUtility::getModuleUrl($moduleName, $arguments, ''); if ($this->section !== '') { $uri .= '#' . $this->section; } if ($this->createAbsoluteUri === TRUE) { $uri = $this->request->getBaseUri() . $uri; } return $uri; }