From 36796545d5594d7479af1f4b27725a79e5e22739 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Mon, 26 Dec 2022 21:19:57 +0100 Subject: [PATCH] group behaviors --- _admin.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/_admin.php b/_admin.php index cdc2e05..7c39811 100644 --- a/_admin.php +++ b/_admin.php @@ -18,9 +18,11 @@ if (!dcCore::app()->auth->isSuperAdmin()) { return null; } -dcCore::app()->addBehavior('adminModulesListGetActions', ['translaterAdminBehaviors', 'adminModulesGetActions']); -dcCore::app()->addBehavior('adminModulesListDoActions', ['translaterAdminBehaviors', 'adminModulesDoActions']); -dcCore::app()->addBehavior('adminDashboardFavoritesV2', ['translaterAdminBehaviors', 'adminDashboardFavoritesV2']); +dcCore::app()->addBehaviors([ + 'adminModulesListGetActions' => ['translaterAdminBehaviors', 'adminModulesGetActions'], + 'adminModulesListDoActions' => ['translaterAdminBehaviors', 'adminModulesDoActions'], + 'adminDashboardFavoritesV2' => ['translaterAdminBehaviors', 'adminDashboardFavoritesV2'], +]); dcCore::app()->menu[dcAdmin::MENU_PLUGINS]->addItem( __('Translater'), @@ -109,10 +111,10 @@ class translaterAdminBehaviors public static function adminDashboardFavoritesV2(dcFavorites $favs): void { $favs->register('translater', [ - 'title' => __('Translater'), - 'url' => dcCore::app()->adminurl->get('translater'), - 'small-icon' => urldecode(dcPage::getPF('translater/icon.svg')), - 'large-icon' => urldecode(dcPage::getPF('translater/icon.svg')), + 'title' => __('Translater'), + 'url' => dcCore::app()->adminurl->get('translater'), + 'small-icon' => urldecode(dcPage::getPF('translater/icon.svg')), + 'large-icon' => urldecode(dcPage::getPF('translater/icon.svg')), //'permissions' => null, ]); }