From 5d15d20f0f8df06cc3f4edcd980eeb2191142085 Mon Sep 17 00:00:00 2001 From: Aled Brown Date: Wed, 28 Nov 2018 17:23:37 +0000 Subject: [PATCH] ModelAdmin Menu Icon Class Documentation Added + Namespace Permissions (#8646) --- .../01_ModelAdmin.md | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/docs/en/02_Developer_Guides/15_Customising_the_Admin_Interface/01_ModelAdmin.md b/docs/en/02_Developer_Guides/15_Customising_the_Admin_Interface/01_ModelAdmin.md index 222532985..9c48321f6 100644 --- a/docs/en/02_Developer_Guides/15_Customising_the_Admin_Interface/01_ModelAdmin.md +++ b/docs/en/02_Developer_Guides/15_Customising_the_Admin_Interface/01_ModelAdmin.md @@ -114,25 +114,37 @@ class Category extends DataObject { public function canView($member = null) { - return Permission::check('CMS_ACCESS_MyAdmin', 'any', $member); + return Permission::check('CMS_ACCESS_Company\Website\MyAdmin', 'any', $member); } public function canEdit($member = null) { - return Permission::check('CMS_ACCESS_MyAdmin', 'any', $member); + return Permission::check('CMS_ACCESS_Company\Website\MyAdmin', 'any', $member); } public function canDelete($member = null) { - return Permission::check('CMS_ACCESS_MyAdmin', 'any', $member); + return Permission::check('CMS_ACCESS_Company\Website\MyAdmin', 'any', $member); } public function canCreate($member = null) { - return Permission::check('CMS_ACCESS_MyAdmin', 'any', $member); + return Permission::check('CMS_ACCESS_Company\Website\MyAdmin', 'any', $member); } } ``` +## Custom ModelAdmin CSS menu icons using built in icon font + +An extended ModelAdmin class supports adding a custom menu icon to the CMS. + +``` +class NewsAdmin extends ModelAdmin +{ + ... + private static $menu_icon_class = 'font-icon-news'; +} +``` +A complete list of supported font icons is available to view in the [SilverStripe Design System Manager](https://projects.invisionapp.com/dsm/silver-stripe/silver-stripe/section/icons/5a8b972d656c91001150f8b6) ## Searching Records