Pages
MMO\editor\cms · 1 symbole · générée le 27 Oct 2026
Pages
Pages.php:40The pages built from sections: what the backoffice does with them, whoever asks (its routes,
- Espace de noms
MMO\editor\cms- Étend
- aModule
- Voir
PagesController, or the application's code).
Index
| EDIT | the right to change a page's draft, make a page, delete one | |
| FIELDS | the fields of a page a client sends | |
| PUBLISH | the right to publish a page, take it offline, roll it back | |
| TEMPLATES | mmo.editor's own layouts and sections, after the application's | |
| VERSION | the fields of a version of a page: what is published, kept as a revision, rendered (Page::exportDraft) | |
| repositories | ||
| revisions | ||
| scope | ||
| templates | ||
| types | ||
| typesFolder | ||
| typesScope | ||
| authorOf($client) | ||
| can($client, $action, $page) | ||
| canEditTypes($client) | ||
| check($client, $action, $page) | ||
| checkTypes($client) | ||
| cleanDraft($input, $page, $whole) | What a client sent for a page, made what the page holds: the html sanitized, every section checked against its type -- or nothing at all. | |
| cleanTranslations($languages, $sections, $translations, $errors) | What a client sent of a page's translations, made what the page holds: one per language but the default one, only their texts (Translations::Strip), the html sanitized, each section translated… | |
| cleanVersion($page, $version) | A version of a page that is not saved (a preview's), made what a draft would hold: the html sanitized, every section checked against its type. | |
| collection($class) | ||
| commit($entity) | Save the changes, and make sure $entity was: a commit only says what it did not save | |
| createPage($client, $input) | Make a page, for $client (who needs EDIT on every page): its draft only, until it is published. | |
| deletePage($client, $page) | Delete $page and its revisions, for $client (who needs EDIT and PUBLISH on it) | |
| getPage($id) | ||
| getPageBySlug($slug) | ||
| getPageCollection() | ||
| getPages() | ||
| getRevisionCollection() | ||
| getRevisions($page) | ||
| getSectionTypes() | ||
| getTypesFolder() | ||
| newSection($type) | ||
| onScopes($request) | The rights of the pages, for the screens granting scopes | |
| pruneRevisions($page, $new) | Keep the last $revisions revisions of $page, $new included: the others go, with the next commit | |
| publish($client, $page) | Publish the draft of $page, for $client: it becomes what visitors see, and a revision of the page. | |
| remove($entity) | ||
| render($version, $mode, $document, $language) | Render a version of a page (Page::exportDraft, or a page's published) | |
| resetSectionTypes() | Read the types again: one was written, or removed (SectionTypeStore) | |
| rollback($client, $page, $number) | Copy the revision $number of $page into its draft, for $client (who needs PUBLISH): the draft it replaces is lost, what visitors see is unchanged until it is published. | |
| saveDraft($client, $page, $input) | Change the draft of $page, for $client: only the fields given, and only when all of them are valid. | |
| setRepositories($repositories) | ||
| unpublish($client, $page) | Take $page offline, for $client: visitors no longer see it, its draft and its revisions stay |
Constantes5
EDIT
the right to change a page's draft, make a page, delete one
FIELDS
the fields of a page a client sends
PUBLISH
the right to publish a page, take it offline, roll it back
TEMPLATES
mmo.editor's own layouts and sections, after the application's
VERSION
the fields of a version of a page: what is published, kept as a revision, rendered (Page::exportDraft)
Propriétés7
repositories
- Type
- array
revisions
- Type
- int
scope
- Type
- string
templates
- Type
- array
types
- Type
- null | SectionTypes
typesFolder
typesScope
- Type
- string
Méthodes31
authorOf($client)
Pages.php:443can($client, $action, $page)
Pages.php:94canEditTypes($client)
Pages.php:254| $client | null | iClient | |
| retourne | bool | whether $client may write the site's section types ($typesScope) |
check($client, $action, $page)
Pages.php:101checkTypes($client)
Pages.php:259cleanDraft($input, $page, $whole)
Pages.php:307What a client sent for a page, made what the page holds: the html sanitized, every section checked against its type -- or nothing at all.
cleanTranslations($languages, $sections, $translations, $errors)
Pages.php:402What a client sent of a page's translations, made what the page holds: one per language but the default one, only their texts (Translations::Strip), the html sanitized, each section translated checked against its type.
cleanVersion($page, $version)
Pages.php:292A version of a page that is not saved (a preview's), made what a draft would hold: the html sanitized, every section checked against its type.
collection($class)
Pages.php:460| $class | string | |
| retourne | Collection |
commit($entity)
Pages.php:467Save the changes, and make sure $entity was: a commit only says what it did not save
createPage($client, $input)
Pages.php:151Make a page, for $client (who needs EDIT on every page): its draft only, until it is published.
deletePage($client, $page)
Pages.php:226Delete $page and its revisions, for $client (who needs EDIT and PUBLISH on it)
getPage($id)
Pages.php:131getPageBySlug($slug)
Pages.php:136getPageCollection()
Pages.php:122| retourne | Collection |
getPages()
Pages.php:142| retourne | array | every page, by slug |
getRevisionCollection()
Pages.php:127| retourne | Collection |
getRevisions($page)
Pages.php:203getSectionTypes()
Pages.php:238| retourne | SectionTypes |
getTypesFolder()
Pages.php:248| retourne | null | string | the folder the section-type editor writes in ($typesFolder), null when there is none |
newSection($type)
Pages.php:267onScopes($request)
Pages.php:109The rights of the pages, for the screens granting scopes
| $request | ScopesList | |
| retourne | void |
pruneRevisions($page, $new)
Pages.php:437Keep the last $revisions revisions of $page, $new included: the others go, with the next commit
| $page | Page | |
| $new | PageRevision | |
| retourne | void |
publish($client, $page)
Pages.php:180Publish the draft of $page, for $client: it becomes what visitors see, and a revision of the page.
| $client | null | iClient | |
| $page | Page | |
| retourne | PageRevision | |
| lève | when the draft is no longer valid (a section type that went away...) |
remove($entity)
Pages.php:448render($version, $mode, $document, $language)
Pages.php:279Render a version of a page (Page::exportDraft, or a page's published)
| $version | array | |
| $mode = MMO\editor\cms\PageRenderer::PUBLIC | string | PageRenderer::PUBLIC, PREVIEW, EDIT |
| $document = null | null | HtmlDocument | |
| $language = null | null | string | one of the version's languages: its texts translated, the default language's where they are not (Translations::Version); null: the default language |
| retourne | HtmlDocument |
resetSectionTypes()
Pages.php:243Read the types again: one was written, or removed (SectionTypeStore)
| retourne | void |
rollback($client, $page, $number)
Pages.php:212Copy the revision $number of $page into its draft, for $client (who needs PUBLISH): the draft it replaces is lost, what visitors see is unchanged until it is published.
saveDraft($client, $page, $input)
Pages.php:168Change the draft of $page, for $client: only the fields given, and only when all of them are valid. The html of the sections is sanitized, the sections without an id get one.
setRepositories($repositories)
Pages.php:84unpublish($client, $page)
Pages.php:195Take $page offline, for $client: visitors no longer see it, its draft and its revisions stay
Membres hérités (48)
| Constantes | Déclaré par | Description | |
|---|---|---|---|
ALERT | iLogLevel | Alert: Action must be taken immediately. | |
ALL | iLogLevel | Mask for all | |
ALL_PLUS | iLogLevel | debug everything | |
BACKTRACE | iLogLevel | ||
CRITICAL | iLogLevel | Critical: Critical conditions. | |
DEBUG | iLogLevel | Debug: Detailed debug information. | |
DEEP | iLogLevel | debug everything with arguments | |
EMERGENCY | iLogLevel | Emergency: System is unusable. | |
ERROR | iLogLevel | Error: Runtime errors that do not require immediate action but should typically be logged and monitored. | |
ERROR_PLUS | iLogLevel | Mask for all error | |
FATAL | iLogLevel | Mask for all fatal error | |
INFO | iLogLevel | Info: Interesting events. | |
INFO_PLUS | iLogLevel | Mask for all errors/warning/notices/info | |
MEMORY | iLogLevel | include backtrace object | |
NOTICE | iLogLevel | Notice: Normal but significant events. | |
NOTICE_PLUS | iLogLevel | Mask for all errors/warning/notices/info | |
TRACE | iLogLevel | include backtrace as origins | |
WARNING | iLogLevel | Warning: Exceptional occurrences that are not errors. | |
WARNING_PLUS | iLogLevel | Mask for all errors and warnings |
| Propriétés | Déclaré par | Description | |
|---|---|---|---|
verbosity | aModule |
| Méthodes | Déclaré par | Description | |
|---|---|---|---|
alert($message, $context) | aModule | Action must be taken immediately. | |
backtraces($message, $context) | aModule | Force-log a message at INFO level together with a full stack trace/memory snapshot (iLogLevel::BACKTRACE), bypassing the verbosity mask entirely (any non-zero verbosity is enough to trigger it). | |
Configure($config) | aModule | Merge $config into this module's configuration in the shared Configuration. | |
critical($message, $context) | aModule | Critical conditions. No-op if CRITICAL is currently filtered out by the verbosity mask. | |
debug($message, $context) | aModule | Detailed debug information. | |
debugName() | aModule | Human-readable identifier used as the default {origin} in this instance's log messages. | |
DefaultConfig() | aModule | The config a module starts from before anything loaded via Configuration is merged in. | |
emergency($message, $context) | aModule | System is unusable. No-op if EMERGENCY is currently filtered out by the verbosity mask. | |
error($message, $context) | aModule | Runtime errors that do not require immediate action but should typically be logged and monitored. | |
getVerbosity() | aModule | ||
info($message, $context) | aModule | Interesting events. No-op if INFO is currently filtered out by the verbosity mask. | |
Instantiate($config) | aModule | (Re)create the shared instance immediately, configured with $config merged into the class's existing config. | |
IsShared() | aModule | ||
log($level, $message, $context) | aModule | Logs with an arbitrary level. | |
notice($message, $context) | aModule | Normal but significant events. | |
offsetExists($key) | aModule | \ArrayAccess::offsetExists -- tells whether $key is a declared property at all, regardless of whether it is currently readable/writable through array access. | |
offsetGet($key) | aModule | \ArrayAccess::offsetGet -- reads a property directly, unless it has a #[Serialize(serialize: 'methodName')] attribute, in which case that zero-argument method is called instead (e.g. | |
offsetSet($key, $value) | aModule | \ArrayAccess::offsetSet -- sets a property directly, unless it has a #[Serialize(unserialize: 'methodName')] attribute, in which case that method is called with $value instead (e.g. | |
offsetUnset($key) | aModule | \ArrayAccess::offsetUnset -- equivalent to $module[$key] = null. | |
serialize($path, $serializer) | aModule | \MMO\core\interfaces\iSerializable::serialize -- exports every property (via | |
setVerbosity($verb) | aModule | Set the current verbosity mask, replacing whatever it was before. | |
Shared() | aModule | Get the shared instance, creating (and configuring) it on first call. | |
testVerbosity($level) | aModule | Test whether a given level (or set of levels) is currently enabled by this instance's verbosity mask. | |
traitUnshare($serialize) | aModule | Remove the shared instance, so the next Shared() call creates a fresh one. | |
unserialize($data, $path, $instances) | aModule | \MMO\core\interfaces\iSerializable::unserialize -- merges $data onto DefaultConfig, runs it through the (possibly overridden) constructor, then applies each resulting value to its property (via | |
Unshare($serialize) | aModule | Like tSingleton::Unshare, but also disconnects this module's instance from every event it was listening to (via Event::DisconnectListeners) before dropping it. | |
warning($message, $context) | aModule | Exceptional occurrences that are not errors. | |
__construct($config) | aModule | protected constructor, so it is not possible to do new Module(...) called by the serialization process just before being injected with data. |