diff --git a/_admin.php b/_admin.php index 8936fce..73d7f12 100644 --- a/_admin.php +++ b/_admin.php @@ -50,7 +50,18 @@ class admin private static function addAdminBehaviors(): void { - dcCore::app()->addBehavior('adminDashboardFavoritesV2', __NAMESPACE__ . '\admin::adminDashboardFavorites'); + dcCore::app()->addBehavior('adminDashboardFavoritesV2', function (dcFavorites $favs): void { + $favs->register( + 'improve', + [ + 'title' => __('improve'), + 'url' => dcCore::app()->adminurl->get('admin.plugin.improve'), + 'small-icon' => dcPage::getPF('improve/icon.svg'), + 'large-icon' => dcPage::getPF('improve/icon.svg'), + //'permissions' => null, + ] + ); + }); } private static function addAdminMenu(): void @@ -73,20 +84,6 @@ class admin } } } - - public static function adminDashboardFavorites(dcFavorites $favs): void - { - $favs->register( - 'improve', - [ - 'title' => __('improve'), - 'url' => dcCore::app()->adminurl->get('admin.plugin.improve'), - 'small-icon' => dcPage::getPF('improve/icon.svg'), - 'large-icon' => dcPage::getPF('improve/icon.svg'), - 'permissions' => null, - ] - ); - } } /* process */