‪TYPO3CMS  ‪main
TYPO3\CMS\Workspaces\Controller\PreviewController Class Reference

Public Member Functions

 __construct (protected readonly StagesService $stageService, protected readonly WorkspaceService $workspaceService, protected readonly PageRenderer $pageRenderer, protected readonly UriBuilder $uriBuilder, protected readonly SiteFinder $siteFinder, protected readonly ModuleTemplateFactory $moduleTemplateFactory)
 
 handleRequest (ServerRequestInterface $request)
 

Protected Member Functions

 isValidStage ($stageArray)
 
 getBackendUser ()
 
 generateUrl (Site $site, int $pageUid, array $parameters)
 

Detailed Description

Implements the preview controller of the workspace module.

This is a specific Backend Controller implementation and is not considered part of the Public TYPO3 API.

Definition at line 44 of file PreviewController.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Workspaces\Controller\PreviewController::__construct ( protected readonly StagesService  $stageService,
protected readonly WorkspaceService  $workspaceService,
protected readonly PageRenderer  $pageRenderer,
protected readonly UriBuilder  $uriBuilder,
protected readonly SiteFinder  $siteFinder,
protected readonly ModuleTemplateFactory  $moduleTemplateFactory 
)

Definition at line 46 of file PreviewController.php.

Member Function Documentation

◆ generateUrl()

TYPO3\CMS\Workspaces\Controller\PreviewController::generateUrl ( Site  $site,
int  $pageUid,
array  $parameters 
)
protected

◆ getBackendUser()

TYPO3\CMS\Workspaces\Controller\PreviewController::getBackendUser ( )
protected

◆ handleRequest()

TYPO3\CMS\Workspaces\Controller\PreviewController::handleRequest ( ServerRequestInterface  $request)

Basically makes sure that the workspace preview is rendered. The preview itself consists of three frames, so there are only the frames-urls we have to generate here.

Definition at line 60 of file PreviewController.php.

References $GLOBALS, TYPO3\CMS\Workspaces\Controller\PreviewController\generateUrl(), TYPO3\CMS\Workspaces\Controller\PreviewController\getBackendUser(), TYPO3\CMS\Workspaces\Controller\PreviewController\isValidStage(), TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode(), and TYPO3\CMS\Core\Information\Typo3Information\URL_COMMUNITY.

◆ isValidStage()

TYPO3\CMS\Workspaces\Controller\PreviewController::isValidStage (   $stageArray)
protected

Evaluate the active state.

Definition at line 159 of file PreviewController.php.

Referenced by TYPO3\CMS\Workspaces\Controller\PreviewController\handleRequest().