use anonymous function
This commit is contained in:
parent
491f3c065e
commit
e557293f80
1 changed files with 12 additions and 15 deletions
27
_admin.php
27
_admin.php
|
@ -50,7 +50,18 @@ class admin
|
||||||
|
|
||||||
private static function addAdminBehaviors(): void
|
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
|
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 */
|
/* process */
|
||||||
|
|
Loading…
Reference in a new issue