PageLayoutController

class \TYPO3\CMS\Backend\Controller\PageLayoutController

The Web > Page module.

Attributes

#[AsController]

Table of Contents

Properties

$availableLanguages  : SiteLanguage[]
$backendLayoutRenderer  : BackendLayoutRenderer
$backendLayoutView  : BackendLayoutView
$currentSelectedLanguage  : int
$eventDispatcher  : EventDispatcherInterface
$iconFactory  : IconFactory
$id  : int
Page uid for which to make the listing
$MOD_MENU  : array
$moduleData  : ModuleData|null
$moduleProvider  : ModuleProvider
$moduleTemplateFactory  : ModuleTemplateFactory
$pageinfo  : array|bool
Current page record
$pageRenderer  : PageRenderer
$pageRepository  : PageRepository
$uriBuilder  : UriBuilder

Methods

__construct()  : mixed
mainAction()  : ResponseInterface
Injects the request object for the current request or subrequest As this controller goes only through the main() method, it is rather simple for now
addJavaScriptModuleInstructions()  : void
createPageLayoutContext()  : PageLayoutContext
generateMessagesForCurrentPage()  : array
Return an array of various messages for the current page record, such as if the page has a special doktype, that can be rendered as info boxes.
getActiveColumnsArray()  : array
getBackendUser()  : BackendUserAuthentication
getExistingPageTranslations()  : array
Fetch all records of the current page ID.
getLanguageService()  : LanguageService
getLocalizedPageRecord()  : array|null
getLocalizedPageTitle()  : string
getNumberOfHiddenElements()  : int
Returns the number of hidden elements (including those hidden by start/end times) on the current page (for the current site language)
getPageLinksWhereContentIsAlsoShownOn()  : string
Get all pages with links where the content of a page $pageId is also shown on.
getShortcutTitle()  : string
Returns the shortcut title for the current page
getTargetPageIfVisible()  : array
Returns the target page if visible
initialize()  : void
initializeClipboard()  : void
Initializes the clipboard for generating paste links dynamically via JavaScript after each "+ Content" symbol
isContentEditable()  : bool
Check if content can be edited by current user
isPageEditable()  : bool
Check if page can be edited by current user.
makeActionMenu()  : void
This creates the dropdown menu with the different actions this module is able to provide.
makeButtons()  : void
This creates the buttons for the modules
makeEditButton()  : ButtonInterface|null
Edit Button
makeLanguageSwitchButton()  : ButtonInterface|null
Language Switch
makeViewButton()  : ButtonInterface|null
View Button
menuConfig()  : void
Initialize menu array
resolveExternalUrl()  : string
Returns the redirect URL for the input page row IF the doktype is set to 3.

Properties

$currentSelectedLanguage

protected int $currentSelectedLanguage

$eventDispatcher read-only

protected EventDispatcherInterface $eventDispatcher

$id

Page uid for which to make the listing

protected int $id = 0

$pageinfo

Current page record

protected array|bool $pageinfo = false

Methods

__construct()

public __construct(IconFactory $iconFactory, PageRenderer $pageRenderer, UriBuilder $uriBuilder, PageRepository $pageRepository, ModuleTemplateFactory $moduleTemplateFactory, EventDispatcherInterface $eventDispatcher, ModuleProvider $moduleProvider, BackendLayoutRenderer $backendLayoutRenderer, BackendLayoutView $backendLayoutView) : mixed

Parameters

$iconFactory : IconFactory
$pageRenderer : PageRenderer
$uriBuilder : UriBuilder
$pageRepository : PageRepository
$moduleTemplateFactory : ModuleTemplateFactory
$eventDispatcher : EventDispatcherInterface
$moduleProvider : ModuleProvider
$backendLayoutRenderer : BackendLayoutRenderer
$backendLayoutView : BackendLayoutView

mainAction()

Injects the request object for the current request or subrequest As this controller goes only through the main() method, it is rather simple for now

public mainAction(ServerRequestInterface $request) : ResponseInterface

Parameters

$request : ServerRequestInterface

Return values

ResponseInterface

addJavaScriptModuleInstructions()

protected addJavaScriptModuleInstructions() : void

generateMessagesForCurrentPage()

Return an array of various messages for the current page record, such as if the page has a special doktype, that can be rendered as info boxes.

protected generateMessagesForCurrentPage(ServerRequestInterface $request) : array

Parameters

$request : ServerRequestInterface

Return values

array

getExistingPageTranslations()

Fetch all records of the current page ID.

protected getExistingPageTranslations() : array

Does not check permissions.

Return values

array

getLocalizedPageRecord()

protected getLocalizedPageRecord(int $languageId) : array|null

Parameters

$languageId : int

Return values

array|null

getLocalizedPageTitle()

protected getLocalizedPageTitle(int $currentSelectedLanguage, array $pageInfo) : string

Parameters

$currentSelectedLanguage : int
$pageInfo : array

Return values

string

getNumberOfHiddenElements()

Returns the number of hidden elements (including those hidden by start/end times) on the current page (for the current site language)

protected getNumberOfHiddenElements(bool $isLanguageModeActive) : int

Parameters

$isLanguageModeActive : bool

Return values

int

getPageLinksWhereContentIsAlsoShownOn()

Get all pages with links where the content of a page $pageId is also shown on.

protected getPageLinksWhereContentIsAlsoShownOn(int $pageId) : string

Parameters

$pageId : int

Return values

string

getShortcutTitle()

Returns the shortcut title for the current page

protected getShortcutTitle() : string

Return values

string

getTargetPageIfVisible()

Returns the target page if visible

protected getTargetPageIfVisible(array $targetPage) : array

Parameters

$targetPage : array

Return values

array

initialize()

protected initialize(ServerRequestInterface $request) : void

Parameters

$request : ServerRequestInterface

initializeClipboard()

Initializes the clipboard for generating paste links dynamically via JavaScript after each "+ Content" symbol

protected initializeClipboard(ServerRequestInterface $request) : void

Parameters

$request : ServerRequestInterface

isContentEditable()

Check if content can be edited by current user

protected isContentEditable(int $languageId) : bool

Parameters

$languageId : int

Return values

bool

isPageEditable()

Check if page can be edited by current user.

protected isPageEditable(int $languageId) : bool

Parameters

$languageId : int

Return values

bool

makeActionMenu()

This creates the dropdown menu with the different actions this module is able to provide.

protected makeActionMenu(ModuleTemplate $view, array $tsConfig) : void

For now, they are Columns and Languages.

Parameters

$view : ModuleTemplate
$tsConfig : array

makeButtons()

This creates the buttons for the modules

protected makeButtons(ModuleTemplate $view, ServerRequestInterface $request, array $tsConfig) : void

Parameters

$view : ModuleTemplate
$request : ServerRequestInterface
$tsConfig : array

menuConfig()

Initialize menu array

protected menuConfig(ServerRequestInterface $request) : void

Parameters

$request : ServerRequestInterface

resolveExternalUrl()

Returns the redirect URL for the input page row IF the doktype is set to 3.

protected resolveExternalUrl(array $pagerow, ServerRequestInterface $request) : string

Parameters

$pagerow : array
$request : ServerRequestInterface

Return values

string
On this page