getPluginDefinition()['migration_tags'])) { foreach ($migration->getPluginDefinition()['migration_tags'] as $tag) { if ($tag == 'Drupal 7') { $core = 7; } } } $definitions = $this->getDefinitions(); foreach ($definitions as $plugin_id => $definition) { if (in_array($core, $definition['core'])) { if (array_key_exists($field_type, $definition['type_map']) || $field_type === $plugin_id) { return $plugin_id; } } } throw new PluginNotFoundException($field_type); } }