FEATURE: move static page handler into config

This commit is contained in:
Michal Kváček
2016-01-27 15:36:11 +01:00
parent 35a93091ff
commit 5db999e3b1
3 changed files with 9 additions and 2 deletions
+6
View File
@@ -0,0 +1,6 @@
<?php
return [
'name' => 'StaticPages',
'handler' => '\\Modules\\StaticPages\\Handlers\\StaticPage'
];
+2 -1
View File
@@ -1,5 +1,6 @@
<?php <?php
return [ return [
'name' => 'StaticPages' 'name' => 'StaticPages',
'handler' => '\\Modules\\StaticPages\\Handlers\\StaticPage'
]; ];
@@ -48,7 +48,7 @@ class StaticPagesServiceProvider extends ServiceProvider
*/ */
protected function install() protected function install()
{ {
$handler = '\\Modules\\StaticPages\\Handlers\\StaticPage'; $handler = config('staticpages.handler');
$installedModules = Modules::getWithTranslations(); $installedModules = Modules::getWithTranslations();
if (!isset($installedModules[$handler])) { if (!isset($installedModules[$handler])) {