Issue #2933620 by masipila, mpdonadio, heddn, quietone, phenaproxima, maxocub, kay_v, cilefen: Polish migrate.api.php API documentation
parent
7e0ddac162
commit
ecfdf60433
|
|
@ -10,77 +10,81 @@ use Drupal\migrate\Plugin\MigrateSourceInterface;
|
||||||
use Drupal\migrate\Row;
|
use Drupal\migrate\Row;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup migration Migration API
|
* @defgroup migration Migrate API
|
||||||
* @{
|
* @{
|
||||||
* Overview of the Migration API, which migrates data into Drupal.
|
* Overview of the Migrate API, which migrates data into Drupal.
|
||||||
*
|
*
|
||||||
* @section overview Overview of migration
|
* @section overview Overview of a migration
|
||||||
* Migration is an
|
* Migration is an
|
||||||
* @link http://wikipedia.org/wiki/Extract,_transform,_load Extract, Transform, Load @endlink
|
* @link http://wikipedia.org/wiki/Extract,_transform,_load Extract, Transform, Load @endlink
|
||||||
* (ETL) process. In the Drupal migration API the extract phase is called
|
* (ETL) process. In the Drupal Migrate API, the extract phase is called
|
||||||
* "source", the transform phase is called "process", and the load phase is
|
* 'source', the transform phase is called 'process', and the load phase is
|
||||||
* called "destination". It is important to understand that the "load" in ETL
|
* called 'destination'. It is important to understand that the term 'load' in
|
||||||
* means to load data into storage, while traditionally Drupal uses "load" to
|
* ETL refers to loading data into the storage while in a typical Drupal context
|
||||||
* mean load data from storage into memory.
|
* the term 'load' refers to loading data from storage.
|
||||||
*
|
*
|
||||||
* In the source phase, a set of data, called the row, is retrieved from the
|
* In the source phase, a set of data, called the row, is retrieved from the
|
||||||
* data source, typically a database but it can be a CSV, JSON or XML file. The
|
* data source. The data can be migrated from a database, loaded from a file
|
||||||
* row is sent to the process phase where it is transformed as needed by the
|
* (for example CSV, JSON or XML) or fetched from a web service (for example RSS
|
||||||
* destination, or marked to be skipped. Processing can also determine that a
|
* or REST). The row is sent to the process phase where it is transformed as
|
||||||
* stub needs to be created, for example, if a term has a parent term that does
|
* needed or marked to be skipped. Processing can also determine if a 'stub'
|
||||||
* not yet exist. After processing the transformed row is passed to the
|
* needs to be created. For example, if a term has a parent term which hasn't
|
||||||
* destination phase where it is loaded (saved) into the Drupal 8 site.
|
* been migrated yet, a stub term is created so that the parent relation can be
|
||||||
|
* established, and the stub is updated at a later point. After processing, the
|
||||||
|
* transformed row is passed to the destination phase where it is loaded (saved)
|
||||||
|
* into the target Drupal site.
|
||||||
*
|
*
|
||||||
* The ETL process is configured by the migration plugin. The different phases:
|
* Migrate API uses the Drupal plugin system for many different purposes. Most
|
||||||
* source, process, and destination are also plugins, and are managed by the
|
* importantly, the overall ETL process is defined as a migration plugin and the
|
||||||
* Migration plugin. So there are four types of plugins in the migration
|
* three phases (source, process and destination) have their own plugin types.
|
||||||
* process: migration, source, process and destination.
|
|
||||||
*
|
*
|
||||||
* @section sec_migrations Migration plugins
|
* @section sec_migrations Migrate API migration plugins
|
||||||
* Migration plugin definitions are stored in a module's 'migrations' directory.
|
* Migration plugin definitions are stored in a module's 'migrations' directory.
|
||||||
* Examples of migration plugin definitions can be found in
|
* The plugin class is \Drupal\migrate\Plugin\Migration, with interface
|
||||||
* 'core/modules/action/migrations'. The plugin class is
|
|
||||||
* \Drupal\migrate\Plugin\Migration, with interface
|
|
||||||
* \Drupal\migrate\Plugin\MigrationInterface. Migration plugins are managed by
|
* \Drupal\migrate\Plugin\MigrationInterface. Migration plugins are managed by
|
||||||
* the \Drupal\migrate\Plugin\MigrationPluginManager class. Migration plugins
|
* the \Drupal\migrate\Plugin\MigrationPluginManager class. Migration plugins
|
||||||
* are only available if the providers of their source plugins are installed.
|
* are only available if the providers of their source plugins are installed.
|
||||||
*
|
*
|
||||||
* @section sec_source Source plugins
|
* @link https://www.drupal.org/docs/8/api/migrate-api/migrate-destination-plugins-examples Example migrations in Migrate API handbook. @endlink
|
||||||
* Migration source plugins implement
|
*
|
||||||
|
* @section sec_source Migrate API source plugins
|
||||||
|
* Migrate API source plugins implement
|
||||||
* \Drupal\migrate\Plugin\MigrateSourceInterface and usually extend
|
* \Drupal\migrate\Plugin\MigrateSourceInterface and usually extend
|
||||||
* \Drupal\migrate\Plugin\migrate\source\SourcePluginBase. They are annotated
|
* \Drupal\migrate\Plugin\migrate\source\SourcePluginBase. They are annotated
|
||||||
* with \Drupal\migrate\Annotation\MigrateSource annotation, and must be in
|
* with \Drupal\migrate\Annotation\MigrateSource annotation and must be in
|
||||||
* namespace subdirectory Plugin\migrate\source under the namespace of the
|
* namespace subdirectory 'Plugin\migrate\source' under the namespace of the
|
||||||
* module that defines them. Migration source plugins are managed by the
|
* module that defines them. Migrate API source plugins are managed by the
|
||||||
* \Drupal\migrate\Plugin\MigrateSourcePluginManager class. Source plugin
|
* \Drupal\migrate\Plugin\MigrateSourcePluginManager class.
|
||||||
* providers are determined by their and their parents namespaces.
|
|
||||||
*
|
*
|
||||||
* @section sec_process Process plugins
|
* @link https://api.drupal.org/api/drupal/namespace/Drupal!migrate!Plugin!migrate!source List of source plugins provided by the core Migrate module. @endlink
|
||||||
* Migration process plugins implement
|
* @link https://www.drupal.org/docs/8/api/migrate-api/migrate-source-plugins Core and contributed source plugin usage examples in Migrate API handbook. @endlink
|
||||||
|
*
|
||||||
|
* @section sec_process Migrate API process plugins
|
||||||
|
* Migrate API process plugins implement
|
||||||
* \Drupal\migrate\Plugin\MigrateProcessInterface and usually extend
|
* \Drupal\migrate\Plugin\MigrateProcessInterface and usually extend
|
||||||
* \Drupal\migrate\ProcessPluginBase. They are annotated
|
* \Drupal\migrate\ProcessPluginBase. They are annotated with
|
||||||
* with \Drupal\migrate\Annotation\MigrateProcessPlugin annotation, and must be
|
* \Drupal\migrate\Annotation\MigrateProcessPlugin annotation and must be in
|
||||||
* in namespace subdirectory Plugin\migrate\process under the namespace of the
|
* namespace subdirectory 'Plugin\migrate\process' under the namespace of the
|
||||||
* module that defines them. Migration process plugins are managed by the
|
* module that defines them. Migrate API process plugins are managed by the
|
||||||
* \Drupal\migrate\Plugin\MigratePluginManager class. The Migrate module
|
* \Drupal\migrate\Plugin\MigratePluginManager class.
|
||||||
* provides process plugins for common operations (setting default values,
|
|
||||||
* mapping values, etc.).
|
|
||||||
*
|
*
|
||||||
* @section sec_destination Destination plugins
|
* @link https://api.drupal.org/api/drupal/namespace/Drupal!migrate!Plugin!migrate!process List of process plugins for common operations provided by the core Migrate module. @endlink
|
||||||
* Migration destination plugins implement
|
*
|
||||||
|
* @section sec_destination Migrate API destination plugins
|
||||||
|
* Migrate API destination plugins implement
|
||||||
* \Drupal\migrate\Plugin\MigrateDestinationInterface and usually extend
|
* \Drupal\migrate\Plugin\MigrateDestinationInterface and usually extend
|
||||||
* \Drupal\migrate\Plugin\migrate\destination\DestinationBase. They are
|
* \Drupal\migrate\Plugin\migrate\destination\DestinationBase. They are
|
||||||
* annotated with \Drupal\migrate\Annotation\MigrateDestination annotation, and
|
* annotated with \Drupal\migrate\Annotation\MigrateDestination annotation and
|
||||||
* must be in namespace subdirectory Plugin\migrate\destination under the
|
* must be in namespace subdirectory 'Plugin\migrate\destination' under the
|
||||||
* namespace of the module that defines them. Migration destination plugins
|
* namespace of the module that defines them. Migrate API destination plugins
|
||||||
* are managed by the \Drupal\migrate\Plugin\MigrateDestinationPluginManager
|
* are managed by the \Drupal\migrate\Plugin\MigrateDestinationPluginManager
|
||||||
* class. The Migrate module provides destination plugins for Drupal core
|
* class.
|
||||||
* objects (configuration and entity).
|
|
||||||
*
|
*
|
||||||
* @section sec_more_info More information
|
* @link https://api.drupal.org/api/drupal/namespace/Drupal!migrate!Plugin!migrate!destination List of destination plugins for Drupal configuration and content entities provided by the core Migrate module. @endlink
|
||||||
* @link https://www.drupal.org/node/2127611 Migration API documentation. @endlink
|
|
||||||
*
|
*
|
||||||
* @see update_api
|
* @section sec_more_info Documentation handbooks
|
||||||
|
* @link https://www.drupal.org/docs/8/api/migrate-api Migrate API handbook. @endlink
|
||||||
|
* @link https://www.drupal.org/docs/8/upgrade Upgrading to Drupal 8 handbook. @endlink
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue