PageInformationFactory
Read onlyYes
FinalYes
Create the PageInformation object. This is typically fired by a middleware. It does all the heavy lifting, page access checks, resolves shortcuts, workspaces, languages and similar.
Possible results:
- The fully set up PageInformation object is returned.
- A PageInformationCreationFailedException is thrown that contains an early Response from the ErrorController
- A StatusException is thrown when ErrorController itself failed
Tags
Table of Contents
Methods
- __construct() : mixed
- create() : PageInformation
- Set up proper PageInformation object later available as 'frontend.page.information' Request attribute.
Methods
__construct()
public
__construct(Context $context, EventDispatcherInterface $eventDispatcher, LoggerInterface $logger, RecordAccessVoter $accessVoter, ErrorController $errorController, SysTemplateRepository $sysTemplateRepository, PageLayoutResolver $pageLayoutResolver, TcaSchemaFactory $tcaSchemaFactory, PageTypeLinkResolver $pageTypeLinkResolver) : mixed
Parameters
- $context : Context
- $eventDispatcher : EventDispatcherInterface
- $logger : LoggerInterface
- $accessVoter : RecordAccessVoter
- $errorController : ErrorController
- $sysTemplateRepository : SysTemplateRepository
- $pageLayoutResolver : PageLayoutResolver
- $tcaSchemaFactory : TcaSchemaFactory
- $pageTypeLinkResolver : PageTypeLinkResolver
create()
Set up proper PageInformation object later available as 'frontend.page.information' Request attribute.
public
create(ServerRequestInterface $request) : PageInformation
At this point, the Context object already contains relevant preview settings, for instance if a backend user is logged in.
As a not obvious side effect, this class also sets the
Parameters
- $request : ServerRequestInterface
Extensions should not call themselves, use events.