mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ModelAdmin Menu Icon Class Documentation Added + Namespace Permissions (#8646)
This commit is contained in:
parent
3f8551df41
commit
5d15d20f0f
@ -114,25 +114,37 @@ class Category extends DataObject
|
|||||||
{
|
{
|
||||||
public function canView($member = null)
|
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)
|
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)
|
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)
|
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
|
## Searching Records
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user