| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function updateCMSFields(FieldList $fields) |
||
| 20 | { |
||
| 21 | $owner = $this->owner; |
||
| 22 | $fieldLabels = $this->owner->FieldLabels(); |
||
| 23 | $label = $fieldLabels['ContactUsFormEntries']; |
||
| 24 | $fields->addFieldToTab( |
||
| 25 | 'Root.ContactForm', |
||
| 26 | GridField::create( |
||
| 27 | 'ContactUsFormEntries', |
||
| 28 | $label, |
||
| 29 | $this->owner->ContactUsFormEntries(), |
||
| 30 | $config = GridFieldConfig_RelationEditor::create() |
||
| 31 | ) |
||
| 32 | ); |
||
| 33 | $config->removeComponentsByType('GridFieldAddExistingAutocompleter'); |
||
| 34 | $config->removeComponentsByType('GridFieldDeleteAction'); |
||
| 35 | |||
| 36 | return $fields; |
||
| 37 | } |
||
| 38 | } |
||
| 39 |
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.