$GLOBALS['TSFE']->pageNotFoundAndExit('');
is currently used, but instead I would like to redirect to a page ID.
With the command redirectToUri
, I could find no solution, or didn't work.
Code:
/**
* initialize action show
* @return void
*/
public function initializeShowAction() {
if ($this->request->hasArgument('xxx')) {
if ( $xxx=$this->xxxRepository->findByUid(
intval($this->request->getArgument('xxx'))
) ) {
$this->request->setArgument('xxx',$xxx);
return;
}
}
$GLOBALS['TSFE']->pageNotFoundAndExit('');
}
$uri = $this->uriBuilder ->setTargetPageUid($pageUid) ->build();
i see no reason to initialize variable $uriBuilder – Topknot