class MigrateField
Same name in this branch
- 11.x core/modules/migrate_drupal/src/Annotation/MigrateField.php \Drupal\migrate_drupal\Annotation\MigrateField
Same name in other branches
- 9 core/modules/migrate_drupal/src/Annotation/MigrateField.php \Drupal\migrate_drupal\Annotation\MigrateField
- 8.9.x core/modules/migrate_drupal/src/Annotation/MigrateField.php \Drupal\migrate_drupal\Annotation\MigrateField
- 10 core/modules/migrate_drupal/src/Annotation/MigrateField.php \Drupal\migrate_drupal\Annotation\MigrateField
- 10 core/modules/migrate_drupal/src/Attribute/MigrateField.php \Drupal\migrate_drupal\Attribute\MigrateField
Defines a field plugin attribute object.
Field plugins are responsible for handling the migration of custom fields (provided by Field API in Drupal 7) to Drupal 8+. They are allowed to alter fieldable entity migrations when these migrations are being generated, and can compute destination field types for individual fields during the actual migration process.
Plugin Namespace: Plugin\migrate\field
For a working example, see \Drupal\datetime\Plugin\migrate\field\DateField
Hierarchy
- class \Drupal\Component\Plugin\Attribute\AttributeBase implements \Drupal\Component\Plugin\Attribute\AttributeInterface
- class \Drupal\Component\Plugin\Attribute\Plugin extends \Drupal\Component\Plugin\Attribute\AttributeBase
- class \Drupal\migrate_drupal\Attribute\MigrateField extends \Drupal\Component\Plugin\Attribute\Plugin
- class \Drupal\Component\Plugin\Attribute\Plugin extends \Drupal\Component\Plugin\Attribute\AttributeBase
Expanded class hierarchy of MigrateField
See also
\Drupal\migrate\Plugin\MigratePluginManager
\Drupal\migrate_drupal\Plugin\MigrateFieldInterface;
\Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase
Related topics
24 files declare their use of MigrateField
- D6FileField.php in core/
modules/ migrate_drupal/ tests/ modules/ migrate_field_plugin_manager_test/ src/ Plugin/ migrate/ field/ D6FileField.php - D6NoCoreVersionSpecified.php in core/
modules/ migrate_drupal/ tests/ modules/ migrate_field_plugin_manager_test/ src/ Plugin/ migrate/ field/ D6NoCoreVersionSpecified.php - DateField.php in core/
modules/ datetime/ src/ Plugin/ migrate/ field/ DateField.php - Email.php in core/
modules/ field/ src/ Plugin/ migrate/ field/ Email.php - EntityReference.php in core/
modules/ field/ src/ Plugin/ migrate/ field/ d7/ EntityReference.php
1 string reference to 'MigrateField'
- migrate_drupal.services.yml in core/
modules/ migrate_drupal/ migrate_drupal.services.yml - core/modules/migrate_drupal/migrate_drupal.services.yml
File
-
core/
modules/ migrate_drupal/ src/ Attribute/ MigrateField.php, line 30
Namespace
Drupal\migrate_drupal\AttributeView source
class MigrateField extends Plugin {
/**
* The plugin definition.
*
* @var array
*/
protected $definition;
/**
* Constructs a migrate field attribute object.
*
* @param string $id
* A unique identifier for the field plugin.
* @param int[] $core
* (optional) The Drupal core version(s) this plugin applies to.
* @param int $weight
* (optional) The weight of this plugin relative to other plugins servicing
* the same field type and core version. The lowest weighted applicable
* plugin will be used for each field.
* @param string[] $type_map
* (optional) Map of D6 and D7 field types to D8+ field type plugin IDs.
* @param string|null $source_module
* (optional) Identifies the system providing the data the field plugin will
* read. The source_module is expected to be the name of a Drupal module
* that must be installed in the source database.
* @param string|null $destination_module
* (optional) Identifies the system handling the data the destination plugin
* will write. The destination_module is expected to be the name of a Drupal
* module on the destination site that must be installed.
* @param class-string|null $deriver
* (optional) The deriver class.
*/
public function __construct(string $id, array $core = [
6,
], int $weight = 0, array $type_map = [], ?string $source_module = NULL, ?string $destination_module = NULL, ?string $deriver = NULL) {
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
AttributeBase::$class | protected | property | The class used for this attribute class. | ||
AttributeBase::$provider | protected | property | The provider of the attribute class. | ||
AttributeBase::get | public | function | Overrides AttributeInterface::get | 6 | |
AttributeBase::getClass | public | function | Overrides AttributeInterface::getClass | 1 | |
AttributeBase::getId | public | function | Overrides AttributeInterface::getId | ||
AttributeBase::getProvider | public | function | Overrides AttributeInterface::getProvider | ||
AttributeBase::setClass | public | function | Overrides AttributeInterface::setClass | 1 | |
AttributeBase::setProvider | public | function | Overrides AttributeInterface::setProvider | ||
MigrateField::$definition | protected | property | The plugin definition. | ||
MigrateField::__construct | public | function | Constructs a migrate field attribute object. | Overrides Plugin::__construct |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.