1 | <?php namespace StudioBonito\Security\Controllers; |
||
13 | class MemberAdmin extends \ModelAdmin |
||
14 | { |
||
15 | /** |
||
16 | * The current url segment. {@link LeftAndMain::$url_segment} |
||
17 | * |
||
18 | * @config |
||
19 | * @var string |
||
20 | */ |
||
21 | private static $url_segment = 'members'; |
||
22 | |||
23 | /** |
||
24 | * The current menu title. {@link LeftAndMain::$menu_title} |
||
25 | * |
||
26 | * @config |
||
27 | * @var string |
||
28 | */ |
||
29 | private static $menu_title = 'Security'; |
||
30 | |||
31 | /** |
||
32 | * The menu icon. |
||
33 | * |
||
34 | * @config |
||
35 | * @var string |
||
36 | */ |
||
37 | private static $menu_icon = 'framework/admin/images/menu-icons/16x16/community.png'; |
||
38 | |||
39 | /** |
||
40 | * @config |
||
41 | * @var int |
||
42 | */ |
||
43 | private static $menu_priority = -1; |
||
44 | |||
45 | /** |
||
46 | * List of all managed {@link DataObject}s in this interface. {@link ModelAdmin::$managed_models} |
||
47 | * |
||
48 | * @config |
||
49 | * @var array|string |
||
50 | */ |
||
51 | private static $managed_models = array( |
||
52 | 'Member', |
||
53 | 'Group', |
||
54 | 'PermissionRole', |
||
55 | ); |
||
56 | |||
57 | /** |
||
58 | * List of all {@link DataObject}s which can be imported through a subclass of {@link BulkLoader} (mostly CSV data). |
||
59 | * |
||
60 | * @config |
||
61 | * @var array |
||
62 | */ |
||
63 | private static $model_importers = array( |
||
64 | 'Member' => 'MemberCsvBulkLoader', |
||
65 | 'Group' => 'GroupCsvBulkLoader', |
||
66 | ); |
||
67 | |||
68 | /** |
||
69 | * Override managed model labels with CMS defaults for member, group and role. |
||
70 | * |
||
71 | * @return array |
||
72 | */ |
||
73 | public function getManagedModels() |
||
91 | |||
92 | /** |
||
93 | * Override gridfield configuration to provide a consistent UX. |
||
94 | * |
||
95 | * @param null $id |
||
96 | * @param null $fields |
||
97 | * |
||
98 | * @return \CMSForm |
||
99 | */ |
||
100 | public function getEditForm($id = null, $fields = null) |
||
122 | } |
||
123 |