Drupal 8  8.0.2
Config Class Reference
Inheritance diagram for Config:

Public Member Functions

 __construct (array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, ConfigFactoryInterface $config_factory)
 import (Row $row, array $old_destination_id_values=array())
 fields (MigrationInterface $migration=NULL)
 getIds ()
 calculateDependencies ()
- Public Member Functions inherited from DestinationBase
 __construct (array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration)
 rollbackAction ()
 checkRequirements ()
 rollback (array $destination_identifier)
 supportsRollback ()
- Public Member Functions inherited from PluginInspectionInterface
 getPluginId ()
 getPluginDefinition ()

Static Public Member Functions

static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration=NULL)
- Static Public Member Functions inherited from ContainerFactoryPluginInterface
static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)

Protected Attributes

- Protected Attributes inherited from DestinationBase
 $supportsRollback = FALSE
 $rollbackAction = MigrateIdMapInterface::ROLLBACK_DELETE

Additional Inherited Members

- Protected Member Functions inherited from DestinationBase
 setRollbackAction (array $id_map)

Detailed Description

Provides Configuration Management destination plugin.

Persist data to the config system.

When a property is NULL, the default is used unless the configuration option 'store null' is set to TRUE.

( id = "config" )

Constructor & Destructor Documentation

__construct ( array  $configuration,
MigrationInterface  $migration,
ConfigFactoryInterface  $config_factory 

Constructs a Config destination object.

array$configurationA configuration array containing information about the plugin instance.
string$plugin_idThe plugin ID for the plugin instance.
mixed$plugin_definitionThe plugin implementation definition.
\Drupal\migrate\Entity\MigrationInterface$migrationThe migration entity.
\Drupal\Core\Config\ConfigFactoryInterface$config_factoryThe configuration factory.

References Drupal\config(), and ConfigFactoryInterface\getEditable().

Here is the call graph for this function:

Member Function Documentation

calculateDependencies ( )

{Calculates dependencies for the configured plugin.Dependencies are saved in the plugin's configuration entity and are used to determine configuration synchronization order. For example, if the plugin integrates with specific user roles, this method should return an array of dependencies listing the specified roles.

array An array of dependencies grouped by type (config, content, module, theme). For example:
'config' => array('user.role.anonymous', 'user.role.authenticated'),
'content' => array('node:article:f0a189e6-55fb-47fb-8005-5bef81c44d6d'),
'module' => array('node', 'user'),
'theme' => array('seven'),
See Also

Implements DependentPluginInterface.

References Drupal\config().

Here is the call graph for this function:

static create ( ContainerInterface  $container,
array  $configuration,
MigrationInterface  $migration = NULL 


fields ( MigrationInterface  $migration = NULL)

{Returns an array of destination fields.Derived classes must implement fields(), returning a list of available destination fields.

Review the cases where we need the Migration parameter, can we avoid that? To be resolved with https://www.drupal.org/node/2543568.
\Drupal\migrate\Entity\MigrationInterface$migration(optional) The migration containing this destination. Defaults to NULL.
  • Keys: machine names of the fields
  • Values: Human-friendly descriptions of the fields.

Implements MigrateDestinationInterface.

getIds ( )

{Get the destination IDs.To support MigrateIdMap maps, derived destination classes should return schema field definition(s) corresponding to the primary key of the destination being implemented. These are used to construct the destination key fields of the map table for a migration using this destination.

array An array of IDs.

Implements MigrateDestinationInterface.

import ( Row  $row,
array  $old_destination_id_values = array() 

{Import the row.Derived classes must implement import(), to construct one new object (pre-populated) using ID mappings in the Migration.

\Drupal\migrate\Row$rowThe row object.
array$old_destination_id_values(optional) The old destination IDs. Defaults to an empty array.
mixed The entity ID or an indication of success.

Implements MigrateDestinationInterface.

References Drupal\config(), and Row\PROPERTY_SEPARATOR.

Here is the call graph for this function:

The documentation for this class was generated from the following file: