mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-12 06:48:41 +00:00
install default theme
This commit is contained in:
parent
fc68a96592
commit
25f7f534d5
|
|
@ -103,6 +103,7 @@ final class ApplicationManager
|
||||||
$this->applications[$app->getInternalName()] = $app;
|
$this->applications[$app->getInternalName()] = $app;
|
||||||
|
|
||||||
$this->installFiles($source, $destination);
|
$this->installFiles($source, $destination);
|
||||||
|
$this->installTheme($destination, 'Akebi');
|
||||||
$this->installFromModules($app);
|
$this->installFromModules($app);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -121,6 +122,31 @@ final class ApplicationManager
|
||||||
Directory::copy($source, $destination);
|
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
|
* Install routes and hooks from modules for application
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user