tag
Creates, updates, ensures, deletes, moves or merges a tag of eztags, with its translations and synonyms.
A step of a YAML migration with type: tag. The class expMigrationStepTag (kernel/classes/migration/steps/expmigrationsteptag.php) is registered in settings/migration.ini [StepSettings] StepTypeList[tag].
Modes
mode: is one of create, update, ensure, delete, move, merge; every step names one.
Keys
| Key | Type | Modes | Default | What it is |
|---|---|---|---|---|
tag | identifier (tag) | update, delete, move, merge | the tag: its id, remote:<remote id> or path:<keyword path> | |
parent | scalar | create, ensure, move | the parent tag (id, remote:, path:); none or 0: at the top. move: the new parent | |
remote_id | string | create, update, ensure | the remote id of the tag; ensure finds the tag by it (without it: by keyword: below parent:) | |
language | string | create, update, ensure | the language of keyword: and synonyms: (default: the default language of content); a new tag's main language | |
keyword | string | create, update, ensure | the keyword in the language of language: | |
keywords | map | create, update, ensure | language => the keyword in it: the translations | |
main_language | string | update, ensure | the language of the tag's main translation (it must have one in it) | |
always_available | bool | create, update, ensure | whether the tag is shown in languages it has no translation in (a new tag: false) | |
synonyms | list | create, update, ensure | keywords that are synonyms of the tag, in the language of language:; the missing ones are added | |
into | identifier (tag) | merge | the tag that keeps the objects, children and synonyms of tag: | |
missing | string: fail, skip | all | "fail" | what happens when the tag, or the extension eztags, 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 |
|---|---|
tag_id | the id of the tag |
remote_id | its remote id |
keyword | its keyword in its main language |
path | its keyword path (Topics/Sport) |
created | true when the step created the tag |
changed | true 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: tag
mode: ensure
parent: "path:Topics"
remote_id: topic-sport
keyword: Sport
keywords: { ger-DE: Sport }
synonyms: [ Sports ]
references: { sport: tag_id }Related
Generated by ./console exp:help:examples from settings/migration.ini, kernel/classes/migration/steps/expmigrationsteptag.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.