@@ 25-41 (lines=17) @@ | ||
22 | /** |
|
23 | * @return FieldList |
|
24 | */ |
|
25 | public function getCMSFields() |
|
26 | { |
|
27 | $this->beforeUpdateCMSFields(function ($fields) { |
|
28 | $fields->addFieldToTab( |
|
29 | 'Root.Main', |
|
30 | LinkField::create('BlockLinkID', 'Link') |
|
31 | ); |
|
32 | }); |
|
33 | ||
34 | $fields = parent::getCMSFields(); |
|
35 | ||
36 | $fields->removeByName([ |
|
37 | 'Title', |
|
38 | ]); |
|
39 | ||
40 | return $fields; |
|
41 | } |
|
42 | ||
43 | public function getTitle() |
|
44 | { |
@@ 45-62 (lines=18) @@ | ||
42 | /** |
|
43 | * @return FieldList |
|
44 | */ |
|
45 | public function getCMSFields() |
|
46 | { |
|
47 | $fields = parent::getCMSFields(); |
|
48 | ||
49 | $fields->removeByName(array( |
|
50 | 'Sort', |
|
51 | 'AccordionID', |
|
52 | )); |
|
53 | ||
54 | $fields->addFieldToTab( |
|
55 | 'Root.Main', |
|
56 | ImageUploadField::create('Image') |
|
57 | ->setFolderName('Uploads/Elements/Accordions'), |
|
58 | 'Content' |
|
59 | ); |
|
60 | ||
61 | return $fields; |
|
62 | } |
|
63 | ||
64 | /** |
|
65 | * @return ValidationResult |