public function extract(Theme $theme, $locale = 'en-US') { $this->catalog = new MessageCatalogue($locale); // remove the last "/" $themeDirectory = substr($theme->getDirectory(), 0, -1); $options = array('path' => $themeDirectory); $this->smartyExtractor->extract($themeDirectory, $this->catalog); if ($this->overrideFromDatabase) { $this->overrideFromDatabase($theme->getName(), $locale, $this->catalog); } foreach ($this->dumpers as $dumper) { if ($this->format === $dumper->getExtension()) { if (null !== $this->outputPath) { $options['path'] = $this->outputPath; } return $dumper->dump($this->catalog, $options); } } throw new \LogicException(sprintf('The format %s is not supported.', $this->format)); }
/** * Get theme directory name * * @return string $this->theme->theme_name */ public function getTheme() { Tools::displayAsDeprecated('Please use $this->theme->getDirectory() instead'); return $this->theme->getDirectory(); }