/**
* Gets the source plugin to use to gather field information.
*
* @param string $core
* The Drupal core version.
*
* @return array|\Drupal\migrate\Plugin\MigrateSourceInterface
* The source plugin, or an empty array if none can be found that meets
* requirements.
*/
protected function getSourcePlugin($core) { $definition =
$this->
getFieldInstanceStubMigrationDefinition($core);
$source_plugin =
$this->migrationPluginManager
->
createStubMigration($definition) ->
getSourcePlugin();
if ($source_plugin instanceof RequirementsInterface
) { try { $source_plugin->
checkRequirements();
} catch (RequirementsException
$e) { // If checkRequirements() failed, the source database did not support
// fields (i.e., Field is not installed in D7). Therefore, $fields will
// be empty and below we'll return an empty array. The migration will