section
Creates, updates, ensures or deletes a section, or assigns a section to a part of the content tree.
A step of a YAML migration with type: section. The class expMigrationStepSection (kernel/classes/migration/steps/expmigrationstepsection.php) is registered in settings/migration.ini [StepSettings] StepTypeList[section].
Modes
mode: is one of create, update, ensure, delete, assign; every step names one.
Keys
| Key | Type | Modes | Default | What it is |
|---|---|---|---|---|
section | identifier (section) | update, delete, assign | the section: its identifier or id | |
identifier | string | create, update, ensure | the identifier of the section; ensure finds the section by it (update: a new identifier) | |
name | string | create, update, ensure | the name of the section | |
navigation_part | string | create, update, ensure | the navigation part of the administration the section belongs to (default: ezcontentnavigationpart) | |
node | identifier (node) | assign | the node whose object (and the objects below it, by scope:) gets the section | |
object | identifier (object) | assign | the object that gets the section (or node:), at its main node | |
scope | string: subtree, inherited, object | assign | "subtree" | subtree (the default): the objects below too; inherited: those below that had the same section; object: the object alone |
missing | string: fail, skip | update, delete, assign | "fail" | what happens when the section is not there: fail (the default) or skip |
Besides these, every step takes the keys of the engine: type, mode, if, references, environments, engines and comment (the file format). A key of type identifier names a node, an object or another part of the installation by id, remote id, path or name (identifiers).
Values for references
references: { <name>: <value> } keeps a value of the step's result as ${ref.<name>} for the steps and migrations after it:
| Value | What it is |
|---|---|
section_id | the id of the section |
identifier | its identifier |
name | its name |
created | true when the step created the section |
changed | true when the step changed it (created, updated, deleted or assigned) |
Undoing
Some steps of this type undo themselves when their migration is rolled back without down: (the class says which); a migration with any other step of it needs down: or a rollback to its caption.
Caches it touches (cleared after the run): content, user_info_cache.
Example
- type: section
mode: ensure
identifier: news
name: News
- type: section
mode: assign
section: news
node: "path:news"Related
Generated by ./console exp:help:examples from settings/migration.ini, kernel/classes/migration/steps/expmigrationstepsection.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.