Commit ecb273fe authored by catch's avatar catch

Issue #2862655 by Jo Fitzgerald, heddn, phenaproxima: Add documentation to...

Issue #2862655 by Jo Fitzgerald, heddn, phenaproxima: Add documentation to Config destination plugin
parent bf359955
......@@ -14,10 +14,56 @@
/**
* Provides Configuration Management destination plugin.
*
* Persist data to the config system.
* Persists data to the config system.
*
* When a property is NULL, the default is used unless the configuration option
* 'store null' is set to TRUE.
* Available configuration keys:
* - store null: (optional) Boolean, if TRUE, when a property is NULL, NULL is
* stored, otherwise the default is used. Defaults to FALSE.
* - translations: (optional) Boolean, if TRUE, the destination will be
* associated with the langcode provided by the source plugin. Defaults to
* FALSE.
*
* Destination properties expected in the imported row:
* - config_name: The machine name of the config.
* - langcode: (optional) The language code of the config.
*
* Examples:
*
* @code
* source:
* plugin: variable
* variables:
* - node_admin_theme
* process:
* use_admin_theme: node_admin_theme
* destination:
* plugin: config
* config_name: node.settings
* @endcode
*
* This will add the value of the variable "node_admin_theme" to the config with
* the machine name "node.settings" as "node.settings.use_admin_theme".
*
* @code
* source:
* plugin: i18n_variable
* variables:
* - site_offline_message
* process:
* langcode: language
* message: site_offline_message
* destination:
* plugin: config
* config_name: system.maintenance
* translations: true
* @endcode
*
* This will add the value of the variable "site_offline_message" to the config
* with the machine name "system.maintenance" as "system.maintenance.message",
* coupled with the relevant langcode as obtained from the "i18n_variable"
* source plugin.
*
* @see \Drupal\migrate_drupal\Plugin\migrate\source\d6\i18nVariable
*
* @MigrateDestination(
* id = "config"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment