themePackageInfo = $themePackageInfo; $this->remove = $remove; $this->themeProvider = $themeProvider; } /** * Uninstall theme from database registry * * @param OutputInterface $output * @param array $themePaths * @return void */ public function uninstallRegistry(OutputInterface $output, array $themePaths) { $output->writeln('Removing ' . implode(', ', $themePaths) . ' from database'); foreach ($themePaths as $themePath) { $this->themeProvider->getThemeByFullPath($themePath)->delete(); } } /** * Uninstall theme from code base * * @param OutputInterface $output * @param array $themePaths * @return void */ public function uninstallCode(OutputInterface $output, array $themePaths) { $output->writeln('Removing ' . implode(', ', $themePaths) . ' from Magento codebase'); $packageNames = []; foreach ($themePaths as $themePath) { $packageNames[] = $this->themePackageInfo->getPackageName($themePath); } $output->writeln($this->remove->remove($packageNames)); } }