-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathadmin.php
More file actions
28 lines (20 loc) · 733 Bytes
/
Copy pathadmin.php
File metadata and controls
28 lines (20 loc) · 733 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
<?php
$this->on('admin.init', function() {
$this('admin')->addAssets([
'imageresize:assets/cp-thumbnail.tag',
]);
if ($this->module('imageresize')->getConfig('replaceAssetsManager')) {
$this('admin')->addAssets([
'imageresize:assets/cp-assets.tag',
'imageresize:assets/assetspanel-imageresize.tag',
]);
}
// bind admin routes
$this->bindClass('ImageResize\\Controller\\Admin', 'imageresize');
if ($this->module('cockpit')->hasaccess('imageresize', 'manage')) {
// add settings entry
$this->on('cockpit.view.settings.item', function () {
$this->renderView('imageresize:views/partials/settings.php');
});
}
});