I have created a custom reports using ui components.
For the export csv I have created a plugin class for this function.
Vendor/Report1//etc/di.xml
<type name="Magento\Ui\Model\Export\MetadataProvider">
<plugin name="custom_export1" type="Vendor\Report1\Plugin\ModifyExportPlugin" sortOrder="1" disabled="false"/>
</type>
I have used the same plugin in another 4 modules.
Vendor/Report2//etc/di.xml
<type name="Magento\Ui\Model\Export\MetadataProvider">
<plugin name="custom_export2" type="Vendor\Report2\Plugin\ModifyExportPlugin" sortOrder="1" disabled="false"/>
</type>
From the above code, if i export from any of the module, both the plugins are called, I need to avoid that,
When export is happened from Module Report1,the plugin from that module to be executed, if called from Report2, the plugin defined in that module need to call.
How this can be achieved? Can anyone help me to resolve this issue. Thanks in advance!!