theme service fix
This commit is contained in:
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace kernel\app_themes\custom;
|
||||
|
||||
use kernel\modules\menu\service\MenuService;
|
||||
use kernel\services\MigrationService;
|
||||
|
||||
class CustomTheme
|
||||
{
|
||||
public MenuService $menuService;
|
||||
public MigrationService $migrationService;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->menuService = new MenuService();
|
||||
$this->migrationService = new MigrationService();
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function init(): void
|
||||
{
|
||||
//TODO
|
||||
}
|
||||
|
||||
public function deactivate(): void
|
||||
{
|
||||
//TODO
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace kernel\app_themes\custom\services;
|
||||
|
||||
class CustomThemeService
|
||||
{
|
||||
|
||||
}
|
@ -98,7 +98,7 @@ class ThemeService
|
||||
{
|
||||
if (isset($themeInfo['theme_class'])) {
|
||||
if (isset($themeInfo['theme_class_file'])) {
|
||||
require_once $themeInfo['theme_class_file'];
|
||||
require_once getConst($themeInfo['theme_class_file']);
|
||||
}
|
||||
$themeClass = new $themeInfo['theme_class']();
|
||||
$themeClass->init();
|
||||
@ -113,7 +113,7 @@ class ThemeService
|
||||
{
|
||||
if (isset($themeInfo['theme_class'])) {
|
||||
if (isset($themeInfo['theme_class_file'])) {
|
||||
require_once $themeInfo['theme_class_file'];
|
||||
require_once getConst($themeInfo['theme_class_file']);
|
||||
}
|
||||
$themeClass = new $themeInfo['theme_class']();
|
||||
$themeClass->deactivate();
|
||||
@ -234,12 +234,12 @@ class ThemeService
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!file_exists($tmpThemeDirFull . "meta/manifest.json")){
|
||||
if (!file_exists($tmpThemeDirFull . "meta/app/manifest.json")){
|
||||
$this->addError('manifest.json not found');
|
||||
return false;
|
||||
}
|
||||
|
||||
$manifestJson = getConst(file_get_contents($tmpThemeDirFull . "meta/manifest.json"));
|
||||
$manifestJson = getConst(file_get_contents($tmpThemeDirFull . "meta/app/manifest.json"));
|
||||
$manifest = Manifest::getWithVars($manifestJson);
|
||||
|
||||
$fileHelper = new Files();
|
||||
|
Reference in New Issue
Block a user