add item to plugin simple menu
This commit is contained in:
parent
7d77a95c5d
commit
476a6bfc7c
@ -8,6 +8,7 @@ todo
|
||||
* use anonymous functions (WIP)
|
||||
* use abstract plugin id
|
||||
* use short settings id
|
||||
* add item to plugin simple menu
|
||||
* add install process
|
||||
|
||||
comListe 0.4.2 - 11-11-2017 - Pierre Van Glabeke
|
||||
|
10
_admin.php
10
_admin.php
@ -36,4 +36,14 @@ dcCore::app()->addBehaviors([
|
||||
'permissions' => dcCore::app()->auth->makePermissions([dcAuth::PERMISSION_ADMIN]),
|
||||
]);
|
||||
},
|
||||
'adminSimpleMenuAddType' => function (ArrayObject $items) {
|
||||
$items['comListe'] = new ArrayObject([__('Comments list'), false]);
|
||||
},
|
||||
'adminSimpleMenuBeforeEdit' => function ($type, $select, &$item) {
|
||||
if (basename(__DIR__) == $type) {
|
||||
$item[0] = __('Comments list');
|
||||
$item[1] = __('Comments list');
|
||||
$item[2] = dcCore::app()->admin->blog_url . dcCore::app()->url->getURLFor(basename(__DIR__));
|
||||
}
|
||||
}
|
||||
]);
|
||||
|
Loading…
Reference in New Issue
Block a user