-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.php
50 lines (35 loc) · 1.02 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
46
47
48
49
50
<?php
/**
* GUI and some ui tweaks for Cockpit CMS, that fit with CpMultiplane frontend - work in progress
*
* @see https://github.com/raffaelj/cockpit_CpMultiplaneGUI
* @see https://github.com/agentejo/cockpit/
*
* @version 0.1.2
* @author Raffael Jesche
* @license MIT
*/
$this->module('cpmultiplanegui')->extend([
'getConfig' => function() {
$config = array_replace_recursive(
$this->app->storage->getKey('cockpit/options', 'multiplane', []),
$this->app->retrieve('multiplane', [])
);
return $config;
},
'findMultiplaneDir' => function() {
// to do...
if (file_exists(dirname(COCKPIT_DIR) . '/modules/Multiplane/bootstrap.php')) {
return dirname(COCKPIT_DIR);
}
},
'createDefaults' => function() {
// to do...
},
]);
// acl
$this('acl')->addResource('cpmultiplanegui', ['manage']);
// admin ui
if (COCKPIT_ADMIN && !COCKPIT_API_REQUEST) {
include_once(__DIR__ . '/admin.php');
}