Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

object_state_group (migration step)

Creates, updates, ensures or deletes an object state group with its states and the translations of their names.

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/examples/migration-steps/object_state_group.md

On this page

object_state_group

Creates, updates, ensures or deletes an object state group with its states and the translations of their names.

A step of a YAML migration with type: object_state_group. The class expMigrationStepObjectStateGroup (kernel/classes/migration/steps/expmigrationstepobjectstategroup.php) is registered in settings/migration.ini [StepSettings] StepTypeList[object_state_group].

Modes

mode: is one of create, update, ensure, delete; every step names one.

Keys

KeyTypeModesDefaultWhat it is
groupidentifier (state_group)update, deletethe group to update or delete: its identifier or id
identifierstringcreate, update, ensurethe identifier of the group; ensure finds the group by it (update: a new identifier)
languagestringcreate, update, ensurethe language of name: (default: the default language of content, ContentObjectLocale)
namestringcreate, update, ensurethe name of the group in the language of language:
namesmapcreate, update, ensurelanguage => the name of the group in it: its translations
descriptionstringcreate, update, ensurethe description of the group in the language of language:
descriptionsmapcreate, update, ensurelanguage => the description of the group in it
stateslistcreate, ensurethe states, each a map: identifier, name, names, description, descriptions; ensure adds the missing ones and changes what differs
add_stateslistupdatestates to add, as in states:
update_statesmapupdatestate identifier => what changes (name, names, description, descriptions, identifier for a new one)
remove_stateslistupdatethe identifiers of states to remove; their objects get the first state left
missingstring: fail, skipupdate, delete"fail"what happens when the group 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:

ValueWhat it is
group_idthe id of the group
identifierits identifier
state_idsstate identifier => id, for every state of the group
createdtrue when the step created the group
changedtrue when the step changed it (created, updated or deleted)

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): state_limitations, user_info_cache, content.

Example

- type: object_state_group
  mode: ensure
  identifier: review
  name: Review
  names: { ger-DE: Prüfung }
  states:
    - { identifier: draft, name: Draft, names: { ger-DE: Entwurf } }
    - { identifier: approved, name: Approved }

Generated by ./console exp:help:examples from settings/migration.ini, kernel/classes/migration/steps/expmigrationstepobjectstategroup.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x