group behaviors
This commit is contained in:
parent
c21a305f56
commit
36796545d5
1 changed files with 9 additions and 7 deletions
16
_admin.php
16
_admin.php
|
@ -18,9 +18,11 @@ if (!dcCore::app()->auth->isSuperAdmin()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
dcCore::app()->addBehavior('adminModulesListGetActions', ['translaterAdminBehaviors', 'adminModulesGetActions']);
|
dcCore::app()->addBehaviors([
|
||||||
dcCore::app()->addBehavior('adminModulesListDoActions', ['translaterAdminBehaviors', 'adminModulesDoActions']);
|
'adminModulesListGetActions' => ['translaterAdminBehaviors', 'adminModulesGetActions'],
|
||||||
dcCore::app()->addBehavior('adminDashboardFavoritesV2', ['translaterAdminBehaviors', 'adminDashboardFavoritesV2']);
|
'adminModulesListDoActions' => ['translaterAdminBehaviors', 'adminModulesDoActions'],
|
||||||
|
'adminDashboardFavoritesV2' => ['translaterAdminBehaviors', 'adminDashboardFavoritesV2'],
|
||||||
|
]);
|
||||||
|
|
||||||
dcCore::app()->menu[dcAdmin::MENU_PLUGINS]->addItem(
|
dcCore::app()->menu[dcAdmin::MENU_PLUGINS]->addItem(
|
||||||
__('Translater'),
|
__('Translater'),
|
||||||
|
@ -109,10 +111,10 @@ class translaterAdminBehaviors
|
||||||
public static function adminDashboardFavoritesV2(dcFavorites $favs): void
|
public static function adminDashboardFavoritesV2(dcFavorites $favs): void
|
||||||
{
|
{
|
||||||
$favs->register('translater', [
|
$favs->register('translater', [
|
||||||
'title' => __('Translater'),
|
'title' => __('Translater'),
|
||||||
'url' => dcCore::app()->adminurl->get('translater'),
|
'url' => dcCore::app()->adminurl->get('translater'),
|
||||||
'small-icon' => urldecode(dcPage::getPF('translater/icon.svg')),
|
'small-icon' => urldecode(dcPage::getPF('translater/icon.svg')),
|
||||||
'large-icon' => urldecode(dcPage::getPF('translater/icon.svg')),
|
'large-icon' => urldecode(dcPage::getPF('translater/icon.svg')),
|
||||||
//'permissions' => null,
|
//'permissions' => null,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue