$pluginDirectories =
(array) $this->container->
getParameter('shopware.plugin_directories'
);
$pluginBasePath =
$pluginDirectories['Default'
];
foreach (['Backend', 'Core', 'Frontend'
] as $namespace) { foreach (new DirectoryIterator($pluginBasePath .
$namespace) as $pluginDir) { if ($pluginDir->
isDot() || !
$pluginDir->
isDir()) { continue;
} $output->
writeln('<info>Importing snippets for ' .
$pluginDir->
getBasename() . ' plugin</info>'
);
$this->
exportPluginSnippets($queryLoader,
$pluginDir->
getPathname(),
$input->
getArgument('file'
));
} } $output->
writeln('<info>Default Plugin snippets processed correctly</info>'
);
} protected function exportPlugins(InputInterface
$input, OutputInterface
$output, QueryHandler
$queryLoader) { $pluginRepository =
$this->container->
get('shopware.model_manager'
)->
getRepository(Plugin::
class);
/** @var Plugin[] $plugins */