Skip to content
Snippets Groups Projects
Commit cd58e45f authored by Ivan Doroshenko's avatar Ivan Doroshenko
Browse files

Issue #3263893 by Matroskeen: EntityGenerate - document configuration properties

parent 0cde13a2
No related branches found
No related tags found
1 merge request!44Issue #3263893: EntityGenerate - document configuration properties
...@@ -11,25 +11,23 @@ use Symfony\Component\DependencyInjection\ContainerInterface; ...@@ -11,25 +11,23 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
/** /**
* This plugin generates entities within the process plugin. * This plugin generates entities within the process plugin.
* *
* @MigrateProcessPlugin(
* id = "entity_generate"
* )
*
* @see EntityLookup
*
* All the configuration from the lookup plugin applies here. In its most * All the configuration from the lookup plugin applies here. In its most
* simple form, this plugin needs no configuration. If there are fields on the * simple form, this plugin needs no configuration. If there are fields on the
* generated entity that are required or need some value, their values can be * generated entity that are required or need some value, their values can be
* provided via values and/or default_values configuration options. * provided via values and/or default_values configuration options.
* *
* Example usage with values and default_values configuration: * Available configuration keys:
* - default_values: (optional) A keyed array of default static values to be
* used for the generated entity.
* - values: (optional) A keyed array of values to be used for the generated
* entity. It supports source and destination fields as you would normally use
* in a process pipeline.
*
* Example:
* @code * @code
* destination: * destination:
* plugin: 'entity:node' * plugin: 'entity:node'
* process: * process:
* type:
* plugin: default_value
* default_value: page
* foo: bar * foo: bar
* field_tags: * field_tags:
* plugin: entity_generate * plugin: entity_generate
...@@ -40,6 +38,12 @@ use Symfony\Component\DependencyInjection\ContainerInterface; ...@@ -40,6 +38,12 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* field_long_description: some_source_field * field_long_description: some_source_field
* field_foo: '@foo' * field_foo: '@foo'
* @endcode * @endcode
*
* @see \Drupal\migrate_plus\Plugin\migrate\process\EntityLookup
*
* @MigrateProcessPlugin(
* id = "entity_generate"
* )
*/ */
class EntityGenerate extends EntityLookup { class EntityGenerate extends EntityLookup {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment