SectionTypeStore
MMO\editor\cms · 1 symbole · générée le 27 Oct 2026
SectionTypeStore
SectionTypeStore.php:23The site's types of section, as the section-type editor writes them (SectionTypesController): the files sections/{name}.schema.json, {name}.phtml and {name}.css of the folder Pages::getTypesFolder.
- Espace de noms
MMO\editor\cms
Index
| HISTORY | the saves of a type kept in its history | |
| MAX_SIZE | the biggest file the editor writes | |
| NAME | what a type's name is made of | |
| pages readonly | ||
| all() | ||
| check($name, $schema, $template, $css) | Check a type before it is saved or previewed. | |
| copy($name, $as) | Copy a type of another folder (mmo.editor's...) into the site's, under $as (its own name by default): the copy replaces the other, and can be changed. | |
| delete($name) | Remove a type of the site (its files go to its history). | |
| folder() | ||
| generate($name, $schema) | Write the template of a schema: every field printed the way mmo.editor's types do, for a developer to start from -- a title as a heading, rich text as html, a link as a button, an image, a list of … | |
| generateFields($properties, $var, $class, $indent, $prefix) | ||
| get($name) | ||
| hiddenNames() | ||
| history($name) | ||
| isWritable() | ||
| keep($name) | Keep the files of $name in its history, the oldest saves going past HISTORY | |
| originOf($template) | ||
| save($name, $schema, $template, $css) | Write a type of the site: its schema, its template, its css (none removes its file). | |
| writableFolder() | ||
| write($file, $content) | ||
| __construct($pages) |
Constantes3
HISTORY
the saves of a type kept in its history
MAX_SIZE
the biggest file the editor writes
NAME
what a type's name is made of
Propriétés1
pages
readonly- Type
- Pages
Méthodes17
all()
SectionTypeStore.php:53| retourne | array | string, label: string, icon: ?string, order: int, origin: string, editable: bool, overrides: bool}> every type the page editor offers: origin is site (the editor's folder), library (mmo.editor's) or other (another folder of the application's); overrides when a site's type replaces one of another folder |
check($name, $schema, $template, $css)
SectionTypeStore.php:96Check a type before it is saved or previewed.
copy($name, $as)
SectionTypeStore.php:179Copy a type of another folder (mmo.editor's...) into the site's, under $as (its own name by default): the copy replaces the other, and can be changed.
delete($name)
SectionTypeStore.php:163Remove a type of the site (its files go to its history). The pages keep their sections of it, shown as « unknown section type » until a type of that name exists again -- or the one it replaced shows again.
folder()
SectionTypeStore.php:34generate($name, $schema)
SectionTypeStore.php:202Write the template of a schema: every field printed the way mmo.editor's types do, for a developer to start from -- a title as a heading, rich text as html, a link as a button, an image, a list of items as cards.
generateFields($properties, $var, $class, $indent, $prefix)
SectionTypeStore.php:231get($name)
SectionTypeStore.php:76history($name)
SectionTypeStore.php:189isWritable()
SectionTypeStore.php:40| retourne | bool | whether the web server can write the site's types |
keep($name)
SectionTypeStore.php:314Keep the files of $name in its history, the oldest saves going past HISTORY
originOf($template)
SectionTypeStore.php:287save($name, $schema, $template, $css)
SectionTypeStore.php:140Write a type of the site: its schema, its template, its css (none removes its file). The files it replaces go to its history first.
writableFolder()
SectionTypeStore.php:306| retourne | string | the site's sections/ folder, made if missing @throws eRuntime when there is none, or it cannot be written |
write($file, $content)
SectionTypeStore.php:328__construct($pages)
SectionTypeStore.php:31| $pages | Pages |