| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function getColumnContent($gridField, $record, $columnName) |
||
| 17 | { |
||
| 18 | $data = new ArrayData(array( |
||
| 19 | 'Link' => Controller::join_links($gridField->Link('item'), $record->ID, 'edit') |
||
| 20 | )); |
||
| 21 | |||
| 22 | $template = $record->canEdit() ? 'GridFieldEditButton' : 'GridFieldViewButton'; |
||
| 23 | |||
| 24 | return $data->renderWith($template); |
||
| 25 | } |
||
| 26 | } |
||
| 27 |
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.