install default theme

This commit is contained in:
Dennis Eichhorn 2020-02-26 21:26:32 +01:00
parent fc68a96592
commit 25f7f534d5

View File

@ -103,6 +103,7 @@ final class ApplicationManager
$this->applications[$app->getInternalName()] = $app;
$this->installFiles($source, $destination);
$this->installTheme($destination, 'Akebi');
$this->installFromModules($app);
}
@ -121,6 +122,31 @@ final class ApplicationManager
Directory::copy($source, $destination);
}
/**
* Install the theme
*
* @param string $destination Destination of the application
* @param string $theme Theme name
*
* @return void
*
* @since 1.0.0
*/
private function installTheme(string $destination, string $theme) : void
{
if (\file_exists($destination . '/css')) {
Directory::delete($destination . '/css');
}
if (\file_exists($destination . '/Themes/' . $theme . '/css')) {
Directory::copy(
$destination . '/Themes/' . $theme . '/css',
$destination . '/css',
true
);
}
}
/**
* Install routes and hooks from modules for application
*