forked from iakta/hugocockpit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.php
More file actions
35 lines (25 loc) · 833 Bytes
/
install.php
File metadata and controls
35 lines (25 loc) · 833 Bytes
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
<?php
/**
* Created by IntelliJ IDEA.
* User: walter
* Date: 23/05/2017
* Time: 18:18
*/
// ACL
$app("acl")->addResource("hugo", ['manage.hugo']);
$app->on('admin.init', function() {
$this->helper('admin')->addAssets('hugo:assets/components/cp-dirselect.tag');
$this->helper('admin')->addAssets('hugo:assets/components/cp-themeselect.tag');
if (!$this->module('cockpit')->hasaccess('hugo', ['manage.hugo'])) {
return;
}
// bind admin routes /collections/*
$this->bindClass('Hugo\\Controller\\Installer', 'hugo_installer');
// add to modules menu
$this('admin')->addMenuItem('modules', [
'label' => 'Hugo Installer',
'icon' => 'hugo:icon.svg',
'route' => '/hugo_installer',
'active' => strpos($this['route'], '/hugo_installer') === 0
]);
});