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

Public Member Functions

 __construct ()
 
ResponseInterface handleRequest (ServerRequestInterface $request)
 

Protected Member Functions

 initializeView (string $templateName)
 
bool isValidStage ($stageArray)
 
string generateJavascript ()
 
BackendUserAuthentication getBackendUser ()
 

Protected Attributes

StagesService $stageService
 
WorkspaceService $workspaceService
 
int $pageId
 
ModuleTemplate $moduleTemplate
 
ViewInterface $view
 

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 42 of file PreviewController.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Workspaces\Controller\PreviewController::__construct ( )

Member Function Documentation

◆ generateJavascript()

string TYPO3\CMS\Workspaces\Controller\PreviewController::generateJavascript ( )
protected

Generates the JavaScript code for the backend, and since we're loading a backend module outside of the actual backend this copies parts of the backend main script.

Returns
‪string

Definition at line 215 of file PreviewController.php.

References $GLOBALS, TYPO3\CMS\Workspaces\Controller\PreviewController\getBackendUser(), and TYPO3\CMS\Backend\Utility\BackendUtility\isModuleSetInTBE_MODULES().

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

◆ getBackendUser()

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

◆ handleRequest()

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

◆ initializeView()

TYPO3\CMS\Workspaces\Controller\PreviewController::initializeView ( string  $templateName)
protected

Sets up the view

Parameters
string$templateName

Definition at line 92 of file PreviewController.php.

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

◆ isValidStage()

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

Evaluate the activate state based on given $stageArray.

Parameters
array$stageArray
Returns
‪bool

Definition at line 203 of file PreviewController.php.

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

Member Data Documentation

◆ $moduleTemplate

ModuleTemplate TYPO3\CMS\Workspaces\Controller\PreviewController::$moduleTemplate
protected

ModuleTemplate object

Definition at line 60 of file PreviewController.php.

◆ $pageId

int TYPO3\CMS\Workspaces\Controller\PreviewController::$pageId
protected

Definition at line 54 of file PreviewController.php.

◆ $stageService

StagesService TYPO3\CMS\Workspaces\Controller\PreviewController::$stageService
protected

Definition at line 46 of file PreviewController.php.

◆ $view

ViewInterface TYPO3\CMS\Workspaces\Controller\PreviewController::$view
protected

Definition at line 64 of file PreviewController.php.

◆ $workspaceService

WorkspaceService TYPO3\CMS\Workspaces\Controller\PreviewController::$workspaceService
protected

Definition at line 50 of file PreviewController.php.