PageLayoutController
The Web > Page module.
Attributes
- #[AsController]
Table of Contents
Properties
- $availableLanguages : array<string|int, SiteLanguage>
- $backendLayoutRenderer : BackendLayoutRenderer
- $backendLayoutView : BackendLayoutView
- $currentSelectedLanguage : int
- $eventDispatcher : EventDispatcherInterface
- $iconFactory : IconFactory
- $id : int
- Page uid for which to make the listing
- $MOD_MENU : array<string|int, mixed>
- $moduleData : ModuleData|null
- $moduleProvider : ModuleProvider
- $moduleTemplateFactory : ModuleTemplateFactory
- $pageinfo : array<string|int, mixed>|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<string|int, mixed>
- 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.
- getBackendUser() : BackendUserAuthentication
- getLanguageService() : LanguageService
- getLocalizedPageRecord() : array<string|int, mixed>|null
- 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<string|int, mixed>
- 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
- makeCloseButton() : ButtonInterface|null
- 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
$availableLanguages
protected
array<string|int, SiteLanguage>
$availableLanguages
= []
$backendLayoutRenderer read-only
protected
BackendLayoutRenderer
$backendLayoutRenderer
$backendLayoutView read-only
protected
BackendLayoutView
$backendLayoutView
$currentSelectedLanguage
protected
int
$currentSelectedLanguage
$eventDispatcher read-only
protected
EventDispatcherInterface
$eventDispatcher
$iconFactory read-only
protected
IconFactory
$iconFactory
$id
Page uid for which to make the listing
protected
int
$id
= 0
$MOD_MENU
protected
array<string|int, mixed>
$MOD_MENU
$moduleData
protected
ModuleData|null
$moduleData
= null
$moduleProvider read-only
protected
ModuleProvider
$moduleProvider
$moduleTemplateFactory read-only
protected
ModuleTemplateFactory
$moduleTemplateFactory
$pageinfo
Current page record
protected
array<string|int, mixed>|bool
$pageinfo
= false
$pageRenderer read-only
protected
PageRenderer
$pageRenderer
$pageRepository read-only
protected
PageRepository
$pageRepository
$uriBuilder read-only
protected
UriBuilder
$uriBuilder
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
ResponseInterfaceaddJavaScriptModuleInstructions()
protected
addJavaScriptModuleInstructions() : void
createPageLayoutContext()
protected
createPageLayoutContext(ServerRequestInterface $request, array<string|int, mixed> $tsConfig) : PageLayoutContext
Parameters
- $request : ServerRequestInterface
- $tsConfig : array<string|int, mixed>
Return values
PageLayoutContextgenerateMessagesForCurrentPage()
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<string|int, mixed>
Parameters
- $request : ServerRequestInterface
Return values
array<string|int, mixed>getBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetLanguageService()
protected
getLanguageService() : LanguageService
Return values
LanguageServicegetLocalizedPageRecord()
protected
getLocalizedPageRecord(int $languageId) : array<string|int, mixed>|null
Parameters
- $languageId : int
Return values
array<string|int, mixed>|nullgetNumberOfHiddenElements()
Returns the number of hidden elements (including those hidden by start/end times) on the current page (for the current site language)
protected
getNumberOfHiddenElements(DrawingConfiguration $drawingConfiguration) : int
Parameters
- $drawingConfiguration : DrawingConfiguration
Return values
intgetPageLinksWhereContentIsAlsoShownOn()
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
stringgetShortcutTitle()
Returns the shortcut title for the current page
protected
getShortcutTitle() : string
Return values
stringgetTargetPageIfVisible()
Returns the target page if visible
protected
getTargetPageIfVisible(array<string|int, mixed> $targetPage) : array<string|int, mixed>
Parameters
- $targetPage : array<string|int, mixed>
Return values
array<string|int, mixed>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
boolisPageEditable()
Check if page can be edited by current user.
protected
isPageEditable(int $languageId) : bool
Parameters
- $languageId : int
Return values
boolmakeActionMenu()
This creates the dropdown menu with the different actions this module is able to provide.
protected
makeActionMenu(ModuleTemplate $view, array<string|int, mixed> $tsConfig) : void
For now, they are Columns and Languages.
Parameters
- $view : ModuleTemplate
- $tsConfig : array<string|int, mixed>
makeButtons()
This creates the buttons for the modules
protected
makeButtons(ModuleTemplate $view, ServerRequestInterface $request, array<string|int, mixed> $tsConfig) : void
Parameters
- $view : ModuleTemplate
- $request : ServerRequestInterface
- $tsConfig : array<string|int, mixed>
makeCloseButton()
protected
makeCloseButton(ButtonBar $buttonBar, string $returnUrl) : ButtonInterface|null
Parameters
- $buttonBar : ButtonBar
- $returnUrl : string
Return values
ButtonInterface|nullmakeEditButton()
Edit Button
protected
makeEditButton(ButtonBar $buttonBar, ServerRequestInterface $request) : ButtonInterface|null
Parameters
- $buttonBar : ButtonBar
- $request : ServerRequestInterface
Return values
ButtonInterface|nullmakeLanguageSwitchButton()
Language Switch
protected
makeLanguageSwitchButton(ButtonBar $buttonbar) : ButtonInterface|null
Parameters
- $buttonbar : ButtonBar
Return values
ButtonInterface|nullmakeViewButton()
View Button
protected
makeViewButton(ButtonBar $buttonBar, array<string|int, mixed> $tsConfig) : ButtonInterface|null
Parameters
- $buttonBar : ButtonBar
- $tsConfig : array<string|int, mixed>
Return values
ButtonInterface|nullmenuConfig()
Initialize menu array
protected
menuConfig() : void
resolveExternalUrl()
Returns the redirect URL for the input page row IF the doktype is set to 3.
protected
resolveExternalUrl(array<string|int, mixed> $pagerow, ServerRequestInterface $request) : string
Parameters
- $pagerow : array<string|int, mixed>
- $request : ServerRequestInterface