XML-D8 Migration: Extending the migration capabilities by using CUSTOM Process plugin
In our last blog post, XML-D8 Migration: Extending the migration capabilities by using available Process plugins , we have extended the migration capabilities by using already available process plugins. In this blog post, we will extend the capabilities of that migration by writing custom Process plugins. In this blog post, we will map the content to different content types based on the 'site url' field in XML. There are no changes in XML file and we are using the same XML file which was used in earlier blog posts. To use the custom plugin, we need to specify the plugin name in our .yml file under config/install, so we have made that one change which looks below, Basically we are telling the migration API that for 'type' field use 'content_type_plugin' and 'site_url' XML field will be used as source. Next we have created the custom process plugin in src/Plugin/migrate/process/ContentTypePlugin.php . This custom process plugin uses 's...