FEATURE: prepare for installing templates

This commit is contained in:
Michal Kváček
2016-09-20 00:46:32 +02:00
parent 7a681fd7f7
commit f087da1b43
22 changed files with 397 additions and 253 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ use App\Models\User;
interface BaseModuleHandler
{
public static function getModuleId();
// public static function getModuleId();
/**
* Register admin menu (or multiple ones)
@@ -0,0 +1,11 @@
<?php
namespace App\Handlers\Contracts;
use App\Models\Module;
interface TemplateHandler extends BaseModuleHandler
{
public static function uninstall(Module $template);
public static function getPublicTemplatePaths();
}
@@ -187,7 +187,6 @@ class TemplateRegistrator
$registeredTemplates = Templates::getWithTranslations();
if (!in_array($templateName, $registeredTemplates)) {
$params = [
'template_name' => $templateName,
'name' => $templateName,
@@ -197,8 +196,6 @@ class TemplateRegistrator
'editable' => 1
];
echo 'ukladam do db '.$templateName."\n";
// save template into database
$newTemplate = Template::create($params);