com\setasign\SetaSite\Controller\Frontend

Page Class Page

File: /SetaSite/src/Controller/Frontend/Page.php

Class hierarchy

  • com\setasign\SetaFramework\Controller\AbstractViewController

Implements

  • \com\setasign\SetaFramework\Controller\ControllerInterface

Summary

Constants

EVENT_AFTER_RENDER

public const Page::EVENT_AFTER_RENDER = 'setasign.frontend_page_controller.after_render'

Will be triggered after a page was rendered.


Type: PageEvent
Note: The rendering of the error-pages isn't included.
Cancelable: Can be canceled by throwing a HttpErrorException.
extraParams:
'sessionContext' => SessionContext
'pageSettings' => PageSettings
'response' => ResponseInterface

EVENT_BEFORE_RENDER

public const Page::EVENT_BEFORE_RENDER = 'setasign.frontend_page_controller.before_render'

Will be triggered before a page will be rendered.


Type: PageEvent
Note: The rendering of the error-pages isn't included.
Cancelable: Can be canceled by throwing a HttpErrorException.
extraParams:
'sessionContext' => SessionContext
'pageSettings' => PageSettings
'params' => &string[]

EVENT_ON_PAGE_NOT_FOUND

public const Page::EVENT_ON_PAGE_NOT_FOUND = 'setasign.frontend_page_controller.page_not_found'

Will be triggered if the requested page couldn't be found. It's possible to throw a ForceResponseException here.


Type: Event
Cancelable: Can be canceled.
extraParams:
'sessionContext' => SessionContext
'pageSettings' => PageSettings
'path' => string
'language' => string
'page' => &null|Page If this isn't null this page will be used instead

Properties

$applicationConfig

private \com\setasign\SetaFramework\Application\ApplicationConfig Page::$applicationConfig

$httpFactory

protected \com\setasign\SetaFramework\Http\HttpFactoryInterface \com\setasign\SetaFramework\Controller\AbstractController::$httpFactory

$pageRenderer

$pages

private Page::$pages

$renderedPage

private string Page::$renderedPage

$response

protected ?\Psr\Http\Message\ResponseInterface \com\setasign\SetaFramework\Controller\AbstractController::$response

$setasite

private Page::$setasite

$status

private int Page::$status = 200

$viewScript

protected string \com\setasign\SetaFramework\Controller\AbstractViewController::$viewScript

Methods

__construct()

public Page::__construct (
\com\setasign\SetaFramework\Http\HttpFactoryInterface $httpFactory,
\com\setasign\SetaFramework\View\View $view,
\com\setasign\SetaSite\SetaSite $setasite,
\com\setasign\SetaSite\Page\Pages $pages,
\com\setasign\SetaSite\Page\PageRenderer $pageRenderer
)
Parameters
$httpFactory : \com\setasign\SetaFramework\Http\HttpFactoryInterface
 
$view : \com\setasign\SetaFramework\View\View
 
$setasite : \com\setasign\SetaSite\SetaSite
 
$pages : \com\setasign\SetaSite\Page\Pages
 
$pageRenderer : \com\setasign\SetaSite\Page\PageRenderer
 

callBlockAction()

protected Page::callBlockAction (
\com\setasign\SetaSite\Page\Page $page,
string $blockUid,
string $action
): void
Parameters
$page : \com\setasign\SetaSite\Page\Page
 
$blockUid : string
 
$action : string
 
Exceptions

Throws \com\setasign\SetaSite\Block\ForceResponseException

Throws \setasign\SetaSso\ForceResponseException

Throws \com\setasign\SetaFramework\Bootstrap\MaintenanceException

Throws \Throwable

clearCookie()

protected Page::clearCookie (
\Psr\Http\Message\ResponseInterface $response
): \Psr\Http\Message\ResponseInterface
Parameters
$response : \Psr\Http\Message\ResponseInterface
 

errorAction()

public Page::errorAction (
\com\setasign\SetaFramework\Log\ApplicationLogHandler $logHandler,
\com\setasign\SetaSite\SessionContext $sessionContext
): void

This action will try to display the error page.

Parameters
$logHandler : \com\setasign\SetaFramework\Log\ApplicationLogHandler
 
$sessionContext : \com\setasign\SetaSite\SessionContext
 

getControllerParams()

protected Page::getControllerParams (
\com\setasign\SetaSite\Page\Page $page,
string $path
): array
Parameters
$page : \com\setasign\SetaSite\Page\Page
 
$path : string
 

getParam()

public \com\setasign\SetaFramework\Controller\AbstractController::getParam (
string $name,
mixed $default = null
): ?mixed

Returns a param if it exists otherwise this will return $default

Parameters
$name : string
 
$default : mixed
 

getParams()

public \com\setasign\SetaFramework\Controller\AbstractController::getParams (
void
): array

Get all existing params

getResponse()

public \com\setasign\SetaFramework\Controller\AbstractController::getResponse (
void
): \Psr\Http\Message\ResponseInterface

getView()

public \com\setasign\SetaFramework\Controller\AbstractViewController::getView (
void
): \com\setasign\SetaFramework\View\View

Returns the view

renderView()

protected Page::renderView (
void
): void
Exceptions

Throws \com\setasign\SetaFramework\View\ViewException

resetResponse()

public \com\setasign\SetaFramework\Controller\AbstractController::resetResponse (
void
): void

setParam()

public \com\setasign\SetaFramework\Controller\AbstractController::setParam (
string $name,
mixed $value
): \com\setasign\SetaFramework\Controller\ControllerInterface

Sets a param

Parameters
$name : string
 
$value : mixed
 

setParams()

public \com\setasign\SetaFramework\Controller\AbstractController::setParams (
array $params
): \com\setasign\SetaFramework\Controller\ControllerInterface

Set a array of params

Note: The params will be merged with the existing params!!

Parameters
$params : array
 

showAction()

public Page::showAction (
\com\setasign\SetaSite\SessionContext $sessionContext,
\com\setasign\SetaFramework\EventManager\EventManager $eventManager,
\com\setasign\SetaFramework\Log\ApplicationLogHandler $logHandler,
\com\setasign\SetaSite\Page\PagePathAndLanguageNegotiator $pagePathAndLanguageNegotiator,
BackendPageInformationHelper $backendPageInformationHelper
): void
Parameters
$sessionContext : \com\setasign\SetaSite\SessionContext
 
$eventManager : \com\setasign\SetaFramework\EventManager\EventManager
 
$logHandler : \com\setasign\SetaFramework\Log\ApplicationLogHandler
 
$pagePathAndLanguageNegotiator : \com\setasign\SetaSite\Page\PagePathAndLanguageNegotiator
 
$backendPageInformationHelper : BackendPageInformationHelper
 
Exceptions

Throws \com\setasign\SetaSite\Exception

Throws \com\setasign\SetaSite\HttpErrorException

Throws \JsonException

Throws \Throwable