| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public function updateCMSFields(FieldList $fields) { |
||
| 11 | $excluded = $this->owner->getExcludedSiteTreeClassNames(); |
||
| 12 | if(!empty($excluded)) { |
||
| 13 | $pages = $this->getLumberjackPagesForGridfield($excluded); |
||
| 14 | $gridField = new GridField( |
||
| 15 | "ChildPages", |
||
| 16 | $this->getLumberjackTitle(), |
||
| 17 | $pages, |
||
| 18 | $this->getLumberjackGridFieldConfig() |
||
| 19 | ); |
||
| 20 | |||
| 21 | $tab = new Tab('ChildPages', $this->getLumberjackTitle(), $gridField); |
||
| 22 | // $fields->insertAfter($tab, 'Main'); |
||
| 23 | $fields->insertBefore($tab, 'Main'); // Only modified line |
||
| 24 | } |
||
| 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.