public function dumpFromDatabase($snippetsDir,
$localeName) { $snippetsDir =
$this->kernelRoot . '/' .
$snippetsDir . '/';
if (!
file_exists($snippetsDir)) { return;
} $snippetRepository =
$this->em->
getRepository('Shopware\Models\Snippet\Snippet'
);
$locale =
$this->em->
getRepository('Shopware\Models\Shop\Locale'
)->
findOneByLocale($localeName);
if (!
$locale) { throw new Exception(sprintf('Locale "%s" not found.',
$localeName));
} $outputAdapter =
new Enlight_Config_Adapter_File([ 'configDir' =>
$snippetsDir . '/',
]);
$inputAdapter =
new Enlight_Config_Adapter_DbTable([ 'db' =>
$this->db,
'table' => 's_core_snippets',
'namespaceColumn' => 'namespace',