-
Notifications
You must be signed in to change notification settings - Fork 1
/
bootstrap.php
executable file
·45 lines (36 loc) · 1.27 KB
/
bootstrap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
class AdminBootstrap extends \Dsc\Bootstrap
{
protected $dir = __DIR__;
protected $namespace = 'Admin';
protected function runAdmin()
{
$f3 = \Base::instance();
if (!is_dir($f3->get('PATH_ROOT') . 'public/AdminTheme'))
{
$publictheme = $f3->get('PATH_ROOT') . 'public/AdminTheme';
$admintheme = $f3->get('PATH_ROOT') . 'vendor/dioscouri/f3-admin/AdminTheme';
$res = symlink($admintheme, $publictheme);
}
\Dsc\System::instance()->get('theme')->setTheme('AdminTheme', $this->dir . '/src/Admin/Theme/');
if (class_exists('\Modules\Factory'))
{
\Modules\Factory::registerPositions( array( 'admin-dashboard') );
}
if (class_exists('\Search\Factory'))
{
\Search\Factory::registerSource(new \Search\Models\Source(array(
'id' => 'navigation',
'title' => 'Navigation Items',
'class' => '\Admin\Models\Navigation',
'priority' => 40,
)));
}
parent::runAdmin();
}
protected function runSite()
{
// do nothing
}
}
$app = new AdminBootstrap();