| Conditions | 1 |
| Paths | 1 |
| Total Lines | 27 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function getCMSFields() |
||
| 16 | { |
||
| 17 | $self =& $this; |
||
| 18 | $this->beforeUpdateCMSFields(function (FieldList $fields) use ($self) { |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var GridFieldConfig_RecordEditor $conf |
||
| 22 | */ |
||
| 23 | $conf = GridFieldConfig_RecordEditor::create(); |
||
| 24 | |||
| 25 | $conf->addComponent(new GridFieldSortableRows('SortOrder')); |
||
| 26 | |||
| 27 | $fields->addFieldToTab( |
||
| 28 | "Root." . _t('HomePage.BlockTabName', 'Blocks'), |
||
| 29 | Gridfield::create( |
||
| 30 | 'HomePageBlocks', |
||
| 31 | _t('HomePage.Block', 'Blocks'), |
||
| 32 | $this->HomePageBlocks(), |
||
| 33 | $conf |
||
| 34 | ) |
||
| 35 | ); |
||
| 36 | }); |
||
| 37 | |||
| 38 | $fields = parent::getCMSFields(); |
||
| 39 | |||
| 40 | return $fields; |
||
| 41 | } |
||
| 42 | } |
||
| 57 |
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.