1 | <?php |
||
3 | class DMSGridFieldAddNewButton extends GridFieldAddNewButton implements GridField_HTMLProvider |
||
|
|||
4 | { |
||
5 | /** |
||
6 | * The document set ID that the document should be attached to |
||
7 | * |
||
8 | * @var int |
||
9 | */ |
||
10 | protected $documentSetId; |
||
11 | |||
12 | /** |
||
13 | * Overriding the parent method to change the template that the DMS add button will be rendered with |
||
14 | * |
||
15 | * @param GridField $gridField |
||
16 | * @return array |
||
17 | */ |
||
18 | public function getHTMLFragments($gridField) |
||
54 | |||
55 | /** |
||
56 | * Set the document set ID that this document should be attached to |
||
57 | * |
||
58 | * @param int $id |
||
59 | * @return $this |
||
60 | */ |
||
61 | public function setDocumentSetId($id) |
||
66 | |||
67 | /** |
||
68 | * Get the document set ID that this document should be attached to |
||
69 | * |
||
70 | * @return int |
||
71 | */ |
||
72 | public function getDocumentSetId() |
||
76 | } |
||
77 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.