/** * Reads the snippet of all theme ini files and write them * into the database. * * The theme snippet namespace are prefixed with themes/theme-name */ private function synchronizeSnippets(Shop\Template $template) { $directory = $this->pathResolver->getSnippetDirectory($template); if (!file_exists($directory) || !$this->snippetConfig['writeToDb']) { return; } $namespace = $this->util->getSnippetNamespace($template); $this->snippetWriter->loadToDatabase($directory, false, $namespace); }
/** * Returns the snippet namespace for the passed template. * * @param Shop\Template $template * @return \Enlight_Components_Snippet_Namespace */ private function getConfigSnippetNamespace(Shop\Template $template) { return $this->snippets->getNamespace($this->util->getSnippetNamespace($template) . 'backend/config'); }