PreviewModule

class \TYPO3\CMS\Adminpanel\Modules\PreviewModule

Extends
AbstractModule
Implements
RequestEnricherInterface, PageSettingsProviderInterface, ResourceProviderInterface

Admin Panel Preview Module

Table of Contents

Interfaces

RequestEnricherInterface
Adminpanel interface to denote that a module has tasks to perform on initialization of the request and may enrich said request
PageSettingsProviderInterface
Adminpanel page settings interface denotes that a module has settings regarding the page rendering.
ResourceProviderInterface
Adminpanel interface to denote that a module has own resource files.

Properties

$config  : array{showHiddenPages?: bool, simulateDate?: int, showHiddenRecords?: bool, showScheduledRecords?: bool, simulateUserGroup?: int, showFluidDebug?: bool}
module configuration, set on initialize
$configurationService  : ConfigurationService
$mainConfiguration  : array
Main Configuration (from UserTSConfig, admPanel)
$subModules  : ModuleInterface[]

Methods

__construct()  : mixed
enrich()  : ServerRequestInterface
Initialize the module - runs in the TYPO3 middleware stack at an early point may manipulate the current request
getCssFiles()  : array
Returns a string array with css files that will be rendered after the module
getIconIdentifier()  : string
getIdentifier()  : string
Identifier for this module, for example "preview" or "cache"
getJavaScriptFiles()  : array
Returns a string array with javascript files that will be rendered after the module
getLabel()  : string
Module label
getPageSettings()  : string
getSubModules()  : ModuleInterface[]
Returns an array of module instances
hasSubmoduleSettings()  : bool
Return true if any of the submodules has settings to be rendered (can be used to render settings in a central place)
isEnabled()  : bool
Returns true if the module is -> either enabled via TSConfig admPanel.enable -> or any setting is overridden override is a way to use functionality of the admin panel without displaying the admin panel to users for example: hidden records or pages can be displayed by default
setSubModules()  : void
Sets array of module instances (instances of `ModuleInterface`) as submodules
clearPreviewSettings()  : void
getBackendUser()  : BackendUserAuthentication|FrontendBackendUserAuthentication
Returns the current BE user.
getConfigOptionForModule()  : string
getLanguageService()  : LanguageService
Returns LanguageService
initializeFrontendPreview()  : void
Initialize frontend preview functionality incl.
isEnabledViaTsConfig()  : bool
Returns true if TSConfig admPanel.enable is set for this module (or all modules)

Properties

$config

module configuration, set on initialize

protected array{showHiddenPages?: bool, simulateDate?: int, showHiddenRecords?: bool, showScheduledRecords?: bool, simulateUserGroup?: int, showFluidDebug?: bool} $config

$mainConfiguration

Main Configuration (from UserTSConfig, admPanel)

protected array $mainConfiguration

Methods

enrich()

Initialize the module - runs in the TYPO3 middleware stack at an early point may manipulate the current request

public enrich(ServerRequestInterface $request) : ServerRequestInterface

Parameters

$request : ServerRequestInterface

Tags

inheritdoc

Return values

ServerRequestInterface

getCssFiles()

Returns a string array with css files that will be rendered after the module

public getCssFiles() : array

Return values

array

getIconIdentifier()

public getIconIdentifier() : string

Return values

string

getIdentifier()

Identifier for this module, for example "preview" or "cache"

public getIdentifier() : string

Tags

inheritdoc

Return values

string

getJavaScriptFiles()

Returns a string array with javascript files that will be rendered after the module

public getJavaScriptFiles() : array

Return values

array

getLabel()

Module label

public getLabel() : string

Tags

inheritdoc

Return values

string

getPageSettings()

public getPageSettings() : string

Tags

inheritdoc

Return values

string

hasSubmoduleSettings()

Return true if any of the submodules has settings to be rendered (can be used to render settings in a central place)

public hasSubmoduleSettings() : bool

Tags

inheritdoc

Return values

bool

isEnabled()

Returns true if the module is -> either enabled via TSConfig admPanel.enable -> or any setting is overridden override is a way to use functionality of the admin panel without displaying the admin panel to users for example: hidden records or pages can be displayed by default

public isEnabled() : bool

Return values

bool

setSubModules()

Sets array of module instances (instances of `ModuleInterface`) as submodules

public setSubModules(array $subModules) : void

Parameters

$subModules : array

Tags

inheritdoc

getConfigOptionForModule()

protected getConfigOptionForModule(string $option) : string

Parameters

$option : string

Return values

string

initializeFrontendPreview()

Initialize frontend preview functionality incl.

protected initializeFrontendPreview(bool $showHiddenPages, bool $showHiddenRecords, int $simulateDate, int $simulateUserGroup, ServerRequestInterface $request) : void

simulation of users or time

Parameters

$showHiddenPages : bool
$showHiddenRecords : bool
$simulateDate : int
$simulateUserGroup : int

UID of the fe_group to simulate

$request : ServerRequestInterface

Tags

throws
Exception

isEnabledViaTsConfig()

Returns true if TSConfig admPanel.enable is set for this module (or all modules)

protected isEnabledViaTsConfig() : bool

Return values

bool
On this page