->
setName('sw:theme:dump:configuration'
) ->
setDescription('Dumps the theme configuration into json files'
) ;
} /**
* {@inheritdoc}
*/
protected function execute(InputInterface
$input, OutputInterface
$output) { $repository =
$this->container->
get(\Shopware\Components\Model\ModelManager::
class)->
getRepository(Shop::
class);
$shops =
$repository->
getShopsWithThemes()->
getResult();
$compiler =
$this->container->
get('theme_compiler'
);
$rootDir =
$this->container->
getParameter('shopware.app.rootDir'
);
if (!\
is_string($rootDir)) { throw new RuntimeException('Parameter shopware.app.rootDir has to be an string'
);
} /** @var Shop $shop */
foreach ($shops as $shop) { $configuration =
$compiler->
getThemeConfiguration($shop);
$file =
$this->
dumpConfiguration($shop,
$configuration);