1 | <?php |
||
3 | class DMSDocumentAdmin extends ModelAdmin |
||
4 | { |
||
5 | private static $managed_models = array( |
||
|
|||
6 | 'DMSDocument', |
||
7 | 'DMSDocumentSet' |
||
8 | ); |
||
9 | |||
10 | private static $url_segment = 'documents'; |
||
11 | |||
12 | private static $menu_title = 'Documents'; |
||
13 | |||
14 | private static $menu_icon = 'dms/images/app_icons/drawer.png'; |
||
15 | |||
16 | public function init() |
||
21 | /** |
||
22 | * Remove the default "add" button and replace it with a customised version for DMS |
||
23 | * |
||
24 | * @return CMSForm |
||
25 | */ |
||
26 | public function getEditForm($id = null, $fields = null) |
||
33 | |||
34 | /** |
||
35 | * If the GridField is for DMSDocument then add a custom "add" button. If it's for DMSDocumentSet then |
||
36 | * update the display fields to include some extra columns that are only for this ModelAdmin, so cannot |
||
37 | * be added directly to the model's display fields. |
||
38 | * |
||
39 | * @param CMSForm $form |
||
40 | * @param GridField $gridField |
||
41 | * @return CMSForm |
||
42 | */ |
||
43 | protected function modifyGridField(CMSForm $form, GridField $gridField) |
||
79 | } |
||
80 |