-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboot.php
More file actions
42 lines (33 loc) · 1.42 KB
/
boot.php
File metadata and controls
42 lines (33 loc) · 1.42 KB
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
<?php
use FriendsOfRedaxo\Dashboard\Api\Get;
use FriendsOfRedaxo\Dashboard\Api\Store;
use FriendsOfRedaxo\Dashboard\Dashboard;
use FriendsOfRedaxo\Dashboard\DashboardDefault;
use FriendsOfRedaxo\Dashboard\DemoItems\DashboardDemo;
$addon = rex_addon::get('dashboard');
if (rex::isBackend()) {
// register dashboard items
rex_extension::register(
'PACKAGES_INCLUDED',
static function () {
Dashboard::init();
// Init default widgets
DashboardDefault::initDefaults();
DashboardDefault::register();
// Init demo items if enabled
DashboardDemo::init();
}, rex_extension::LATE,
);
rex_api_function::register('dashboard_get', Get::class);
rex_api_function::register('dashboard_store', Store::class);
rex_perm::register('dashboard[move-items]', null, rex_perm::EXTRAS);
if ('dashboard' == rex_be_controller::getCurrentPagePart(1)) {
rex_view::addCssFile($addon->getAssetsUrl('css/style.css'));
rex_view::addCssFile($addon->getAssetsUrl('css/dashboard2-style.css'));
// Bootstrap Table JS (für Tabellen-Widgets)
rex_view::addJsFile($addon->getAssetsUrl('js/table.min.js'));
rex_view::addJsFile($addon->getAssetsUrl('js/table.locale.min.js'));
rex_view::addJsFile($addon->getAssetsUrl('js/script.js'));
rex_view::addJsFile($addon->getAssetsUrl('js/chart.min.js'));
}
}