| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 1 |
| 1 | <?php |
||
| 9 | 1 | public function updateCMSFields(FieldList $fields) |
|
| 10 | { |
||
| 11 | 1 | $galleryField = new TreeDropdownField( |
|
| 12 | 1 | 'AttachedGalleryID', |
|
| 13 | 1 | _t('AttachedGalleryExtension.CHOOSE_A_GALLERY', 'Choose another gallery to show on this page'), |
|
| 14 | 'GalleryPage' |
||
| 15 | 1 | ); |
|
| 16 | |||
| 17 | 1 | $fields->addFieldToTab('Root.'._t('AttachedGalleryExtension.ATTACHED_GALLERY', 'Attached Gallery'), $galleryField); |
|
| 18 | 1 | } |
|
| 19 | |||
| 41 |
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.