1 | <?php |
||
3 | class GridFieldMergeAction implements GridField_ColumnProvider, GridField_ActionProvider |
||
|
|||
4 | { |
||
5 | /** |
||
6 | * List of records to show in the MergeAction column. |
||
7 | * |
||
8 | * @var array|SS_List |
||
9 | */ |
||
10 | protected $records; |
||
11 | |||
12 | /** |
||
13 | * Type of parent DataObject (i.e BlogTag, BlogCategory). |
||
14 | * |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $parentType; |
||
18 | |||
19 | /** |
||
20 | * Relationship method to reference parent (i.e BlogTags). |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $parentMethod; |
||
25 | |||
26 | /** |
||
27 | * Relationship method to reference child (i.e BlogPosts). |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $childMethod; |
||
32 | |||
33 | /** |
||
34 | * @param array|SS_List $records |
||
35 | * @param string $parentType |
||
36 | * @param string $parentMethod |
||
37 | * @param string $childMethod |
||
38 | */ |
||
39 | public function __construct($records = array(), $parentType, $parentMethod, $childMethod) |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function augmentColumns($gridField, &$columns) |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | public function getColumnsHandled($gridField) |
||
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | public function getColumnContent($gridField, $record, $columnName) |
||
97 | |||
98 | /** |
||
99 | * {@inheritdoc} |
||
100 | */ |
||
101 | public function getColumnAttributes($gridField, $record, $columnName) |
||
105 | |||
106 | /** |
||
107 | * {@inheritdoc} |
||
108 | */ |
||
109 | public function getColumnMetadata($gridField, $columnName) |
||
113 | |||
114 | /** |
||
115 | * {@inheritdoc} |
||
116 | */ |
||
117 | public function getActions($gridField) |
||
121 | |||
122 | /** |
||
123 | * {@inheritdoc} |
||
124 | */ |
||
125 | public function handleAction(GridField $gridField, $actionName, $arguments, $data) |
||
149 | } |
||
150 |
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.