MMOframework
Why AI Playground Libraries Developers Agency
FR EN
Build a project live
Index

SectionTypeOverrides

MMO\admin\helpers · 1 symbol · generated 30 Nov 2026

class

SectionTypeOverrides

SectionTypeOverrides.php:18

The section types a site saved on its server, which replace this project's (Target::sectionTypesPolicy): its sections/ read on the target -- each file's sha256 and time, nothing transferred --, compared by mmo.editor's TypeOverrides with this project's templates and mmo.editor's own. What section-types prints, and what a hub keeps (TypeOverrideStatus).

class MMO\admin\helpers\SectionTypeOverrides
Namespace
MMO\admin\helpers
$read = (new SectionTypeOverrides($target, '/home/me/dev/acme'))->read(); $read['status']; // `none` (it saves no type), `clean` (none saved now) or `overrides`; $read['types'] by name

Index

CLEANit saves them, and none is there
COMPAREthe class comparing them: mmo.editor's, which mmo.admin does not depend on
NONEthe site saves no section type of its own (no sectionTypes in deploy.json)
OVERRIDEStypes saved on the server replace this project's, or are new
project
target
files($folder)
read()
remoteFolder($folder)
shipped($templates)
__construct($target, $project)

Constants4

CLEAN

it saves them, and none is there

const CLEAN = 'clean'

COMPARE

the class comparing them: mmo.editor's, which mmo.admin does not depend on

const COMPARE = '\\MMO\\editor\\cms\\TypeOverrides'

NONE

the site saves no section type of its own (no sectionTypes in deploy.json)

const NONE = 'none'

OVERRIDES

types saved on the server replace this project's, or are new

const OVERRIDES = 'overrides'

Properties2

project

protected string $project
Type
string

target

protected MMO\admin\entities\Target $target
Type
Target

Methods5

files($folder)

SectionTypeOverrides.php:43
function files(string $folder): array
$folderstring
returnsarrayarray{sha256: string, mtime: int}> by file name: the files of the section types of the site's folder, and of its blocks and variants (_blocks/video.phtml), read on the target (none when it has no such folder)

read()

SectionTypeOverrides.php:75
function read(): array
See
NONE, CLEAN, OVERRIDES; folder where the site saves them, on the target
returnsarraystring, folder: ?string, types: array<string, array{new: bool, replaces: ?string, files: array<string, string>, mtime: int}>}
throwswithout mmo.editor, \Throwable when the target cannot be read

remoteFolder($folder)

SectionTypeOverrides.php:32
function remoteFolder(string $folder): string
$folderstring
returnsstringwhere the saved types are on the target: in shared/ when their folder is shared, else in the live release

shipped($templates)

SectionTypeOverrides.php:62
function shipped(array $templates): array
$templatesarray
returnsarraystring> origin => sections/ folder here: the project's templates (by their path), then mmo.editor's own