FieldDiscovery
class FieldDiscovery implements FieldDiscoveryInterface (View source)
Provides field discovery for Drupal 6 & 7 migrations.
Properties
| protected MigrateCckFieldPluginManagerInterface | $cckPluginManager | The CCK plugin manager. |
|
| protected array | $fieldPluginCache | An array of already discovered field plugin information. |
|
| protected MigrateFieldPluginManagerInterface | $fieldPluginManager | The field plugin manager. |
|
| protected MigrationPluginManagerInterface | $migrationPluginManager | The migration plugin manager. |
|
| protected LoggerInterface | $logger | The logger channel service. |
|
| protected array | $discoveredFieldsCache | A cache of discovered fields. |
|
| protected array | $bundleKeys | An array of bundle keys, keyed by drupal core version. |
|
| protected array | $sourcePluginIds | An array of source plugin ids, keyed by Drupal core version. |
|
| protected array | $supportedCoreVersions | An array of supported Drupal core versions. |
Methods
Constructs a FieldDiscovery object.
Adds the field processes for an entity to a migration.
Adds the field processes for a bundle to a migration.
Returns the appropriate field plugin for a given field type.
Gets all field information related to this migration.
Gets all field information for a particular entity type.
Gets all field information for a particular entity type and bundle.
Gets the deprecated CCK Plugin Manager service as a BC shim.
Gets the source plugin to use to gather field information.
Provides the stub migration definition for a given Drupal core version.
Details
__construct(MigrateFieldPluginManagerInterface $field_plugin_manager, MigrationPluginManagerInterface $migration_plugin_manager, LoggerInterface $logger)
Constructs a FieldDiscovery object.
addAllFieldProcesses(MigrationInterface $migration)
Adds the field processes to a migration.
This method is used in field migrations to execute the migration process alter method specified by the 'field_plugin_method' key of the migration for all field plugins applicable to this Drupal to Drupal migration. This method is used internally for field, field instance, widget, and formatter migrations to allow field plugins to alter the process for these migrations.
addEntityFieldProcesses(MigrationInterface $migration, string $entity_type_id)
Adds the field processes for an entity to a migration.
This method is used in field migrations to execute the migration process alter method specified by the 'field_plugin_method' key of the migration for all field plugins applicable to this Drupal to Drupal migration. This method is used internally for field, field instance, widget, and formatter migrations to allow field plugins to alter the process for these migrations.
addBundleFieldProcesses(MigrationInterface $migration, string $entity_type_id, string $bundle)
Adds the field processes for a bundle to a migration.
protected MigrateCckFieldInterface|MigrateFieldInterface|bool
getFieldPlugin(string $field_type, MigrationInterface $migration)
Returns the appropriate field plugin for a given field type.
protected array
getAllFields(string $core)
Gets all field information related to this migration.
protected array
getEntityFields(string $core, string $entity_type_id)
Gets all field information for a particular entity type.
protected array
getBundleFields(string $core, string $entity_type_id, string $bundle)
Gets all field information for a particular entity type and bundle.
protected MigrateCckFieldPluginManagerInterface
getCckPluginManager()
Gets the deprecated CCK Plugin Manager service as a BC shim.
We don't inject this service directly because it is deprecated, and we don't want to instantiate the plugin manager unless we have to, to avoid triggering deprecation errors.
protected array|MigrateSourceInterface
getSourcePlugin(string $core)
Gets the source plugin to use to gather field information.
protected array
getFieldInstanceStubMigrationDefinition(string $core)
Provides the stub migration definition for a given Drupal core version.
protected string|bool
getCoreVersion(MigrationInterface $migration)
Finds the core version of a Drupal migration.