/** * Creates a custom theme based on a css file. * * @param string $name * @param File $file */ public function createCustomTheme($name, File $file) { $theme = new Theme(); $theme->setName($name); $themeDir = "{$this->themeDir}/{$theme->getNormalizedName()}"; $fs = new Filesystem(); $fs->mkdir($themeDir); $file->move($themeDir, 'bootstrap.css'); $this->om->persist($theme); $this->om->flush(); }