Conditions | 3 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
8 | public function getColumnContent($gridField, $record, $columnName) { |
||
9 | if(!$record->canDelete()) return; |
||
10 | |||
11 | if(!$record instanceof ElementVirtualLinked) { |
||
12 | $field = GridField_FormAction::create($gridField, |
||
13 | 'UnlinkRelation'.$record->ID, |
||
14 | false, |
||
15 | 'unlinkrelation', |
||
16 | array('RecordID' => $record->ID) |
||
17 | ) |
||
18 | ->addExtraClass('gridfield-button-unlink') |
||
19 | ->setAttribute('title', _t('GridAction.UnlinkRelation', "Unlink")) |
||
20 | ->setAttribute('data-icon', 'chain--minus'); |
||
21 | |||
22 | return $field->Field(); |
||
23 | } |
||
24 | } |
||
25 | } |
||
26 |
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.