PageLinkMessageProvider
readonly class \
Internal
To be used in the Content > Layout module and not part of public API.
Table of Contents
Properties
- $connectionPool : ConnectionPool
- $pageTypeLinkResolver : PageTypeLinkResolver
- $recordFactory : RecordFactory
- $tcaSchemaFactory : TcaSchemaFactory
- $uriBuilder : UriBuilder
Methods
- __construct() : mixed
- generateMessagesForPageTypeLink() : array{message: string, state: ContextualFeedbackSeverity}
- Generates the messages that are displayed in the Content > Layout module to show the target of a page of type link.
- findRecord() : RecordInterface|null
- generateFrontendLink() : array
- generateLinkToContentElement() : string
- Generates a link to the page module containing the content element and displays information about the content element.
- generateLinkToCurrent() : string
- Generates the backend message for link pages linking to current request page, with or without appending parameters.
- getBackendUser() : BackendUserAuthentication
- getLanguageService() : LanguageService
- getMessageBasedOnPageRecordAndUnhandledLinkTypes() : array{message: string, state: ContextualFeedbackSeverity}
- getMessageForMissingLink() : array{message: string, state: ContextualFeedbackSeverity}
- getMessageForPageTypeLinkToPage() : array{message: string, state: ContextualFeedbackSeverity}
- getMessageForPageTypeLinkToRecord() : array{message: string, state: ContextualFeedbackSeverity}
Properties
$connectionPool
protected
ConnectionPool
$connectionPool
$pageTypeLinkResolver
protected
PageTypeLinkResolver
$pageTypeLinkResolver
$recordFactory
protected
RecordFactory
$recordFactory
$tcaSchemaFactory
protected
TcaSchemaFactory
$tcaSchemaFactory
$uriBuilder
protected
UriBuilder
$uriBuilder
Methods
__construct()
public
__construct(ConnectionPool $connectionPool, PageTypeLinkResolver $pageTypeLinkResolver, RecordFactory $recordFactory, UriBuilder $uriBuilder, TcaSchemaFactory $tcaSchemaFactory) : mixed
Parameters
- $connectionPool : ConnectionPool
- $pageTypeLinkResolver : PageTypeLinkResolver
- $recordFactory : RecordFactory
- $uriBuilder : UriBuilder
- $tcaSchemaFactory : TcaSchemaFactory
generateMessagesForPageTypeLink()
Generates the messages that are displayed in the Content > Layout module to show the target of a page of type link.
public
generateMessagesForPageTypeLink(array $pageRecord, ServerRequestInterface $request) : array{message: string, state: ContextualFeedbackSeverity}
Parameters
- $pageRecord : array
-
the database row of the page of type link
- $request : ServerRequestInterface
Return values
array{message: string, state: ContextualFeedbackSeverity}findRecord()
protected
findRecord(string $table, int $uid) : RecordInterface|null
Parameters
- $table : string
- $uid : int
Return values
RecordInterface|nullgenerateFrontendLink()
protected
generateFrontendLink(string $pageLink, LanguageService $languageService, string $type) : array
Parameters
- $pageLink : string
- $languageService : LanguageService
- $type : string
Return values
arraygenerateLinkToContentElement()
Generates a link to the page module containing the content element and displays information about the content element.
protected
generateLinkToContentElement(int $fragment, ServerRequestInterface $request, string $linkedPage) : string
Parameters
- $fragment : int
- $request : ServerRequestInterface
- $linkedPage : string
Return values
stringgenerateLinkToCurrent()
Generates the backend message for link pages linking to current request page, with or without appending parameters.
protected
generateLinkToCurrent(array $linkInfo, ServerRequestInterface $request, LanguageService $languageService) : string
Parameters
- $linkInfo : array
- $request : ServerRequestInterface
- $languageService : LanguageService
Return values
stringgetBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetLanguageService()
protected
getLanguageService() : LanguageService
Return values
LanguageServicegetMessageBasedOnPageRecordAndUnhandledLinkTypes()
protected
getMessageBasedOnPageRecordAndUnhandledLinkTypes(array $pageRecord, array $linkInfo, ServerRequestInterface $request, LanguageService $languageService) : array{message: string, state: ContextualFeedbackSeverity}
Parameters
- $pageRecord : array
-
the database row of the page of type link
- $linkInfo : array
- $request : ServerRequestInterface
- $languageService : LanguageService
Return values
array{message: string, state: ContextualFeedbackSeverity}getMessageForMissingLink()
protected
getMessageForMissingLink(ServerRequestInterface $request, LanguageService $languageService) : array{message: string, state: ContextualFeedbackSeverity}
Parameters
- $request : ServerRequestInterface
- $languageService : LanguageService
Return values
array{message: string, state: ContextualFeedbackSeverity}getMessageForPageTypeLinkToPage()
protected
getMessageForPageTypeLinkToPage(array $linkInfo, ServerRequestInterface $request, LanguageService $languageService) : array{message: string, state: ContextualFeedbackSeverity}
Parameters
- $linkInfo : array
- $request : ServerRequestInterface
- $languageService : LanguageService
Return values
array{message: string, state: ContextualFeedbackSeverity}getMessageForPageTypeLinkToRecord()
protected
getMessageForPageTypeLinkToRecord(array $linkInfo, ServerRequestInterface $request, LanguageService $languageService) : array{message: string, state: ContextualFeedbackSeverity}
Parameters
- $linkInfo : array
- $request : ServerRequestInterface
- $languageService : LanguageService