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

trash (migration step)

Moves content to the trash, restores it from the trash, or purges it for good.

Download as PDF

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

On this page

trash

Moves content to the trash, restores it from the trash, or purges it for good.

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

Modes

mode: is one of move, restore, purge; every step names one.

Keys

KeyTypeModesDefaultWhat it is
objectidentifier (object)allthe object: move puts it in the trash; restore and purge take it from there (its id or remote:<remote id>)
nodeidentifier (node)movea node of the object that goes to the trash (or object:)
parentidentifier (node)restorethe node a restored object is placed below (default: the parent it had, when it is still there)
allboolpurgefalsetrue: the whole trash is emptied (instead of object:)
missingstring: fail, skipall"fail"what happens when the object is not there (move) or not in the trash (restore, purge): fail (the default) or skip
workflowsboolmove, restorefalsetrue: the workflows of the operation's triggers run, as in the administration (default: they do not)

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
object_idthe id of the object
remote_idits remote id
nameits name
node_idits main node after a restore (null otherwise)
purgedhow many objects a purge removed
changedtrue when the step changed something

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.

Example

- type: trash
  mode: move
  node: "path:news/old-article"
- type: trash
  mode: restore
  object: remote:old-article
  parent: "path:archive"

Generated by ./console exp:help:examples from settings/migration.ini, kernel/classes/migration/steps/expmigrationsteptrash.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