PageRenderer
MMO\editor\cms · 1 symbole · générée le 27 Oct 2026
PageRenderer
PageRenderer.php:27Render a version of a page (Page::exportDraft, Page::getPublished) into an html document: each section by its template (sections/{type}.phtml), then the page's layout (layouts/{layout}.phtml) around them.
- Espace de noms
MMO\editor\cms
Index
Constantes3
EDIT
PREVIEW
PUBLIC
Propriétés3
mode
readonly- Type
- string
sanitizer
- Type
- Sanitizer
types
readonly- Type
- SectionTypes
Méthodes4
getStyles()
PageRenderer.php:86| retourne | string | the css of the sections (SectionTypes::getStyles), for a layout that places the sections itself ($_VARS['sections']) rather than printing content, which holds them |
render($version, $document)
PageRenderer.php:43| $version | array | |
| $document = null | null | HtmlDocument | the document to render in, a new one (dressed by the theme) otherwise |
| retourne | HtmlDocument | |
| lève | when the page's layout, and the default landing one, cannot be found |
renderSection($section, $version, $document)
PageRenderer.php:95| $section | array | |
| $version | array | |
| $document | HtmlDocument | |
| retourne | string | its html: nothing on the public page for a type that no longer exists, a placeholder elsewhere |
__construct($types, $mode)
PageRenderer.php:34| $types | SectionTypes | |
| $mode = self::PUBLIC | string |