Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function getColumnContent($gridField, $record, $columnName) |
||
28 | { |
||
29 | // No permission checks, handled through GridFieldDetailForm, |
||
30 | // which can make the form readonly if no edit permissions are available. |
||
31 | if ($record->hasMethod("CMSEditLink")) { |
||
32 | $data = new ArrayData(array( |
||
33 | 'Link' => Controller::join_links($record->CMSEditLink()) |
||
34 | )); |
||
35 | return $data->renderWith('GridFieldEditButtonInSiteTree'); |
||
36 | } else { |
||
37 | return parent::getColumnContent($gridField, $record, $columnName); |
||
38 | } |
||
39 | } |
||
40 | } |
||
41 |
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.