| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 36 | public function getCMSFields() |
||
| 37 | { |
||
| 38 | $fields = parent::getCMSFields(); |
||
| 39 | $indexes = (new SolrCoreService())->getValidIndexes(); |
||
| 40 | $indexList = []; |
||
| 41 | /** @var BaseIndex $index */ |
||
| 42 | foreach ($indexes as $index) { |
||
| 43 | $indexList[$index] = (new $index())->getIndexName(); |
||
| 44 | } |
||
| 45 | |||
| 46 | $fields->addFieldToTab( |
||
| 47 | 'Root.Main', |
||
| 48 | DropdownField::create('Index', _t(self::class . '.INDEXNAME', 'Solr core'), $indexList) |
||
| 49 | ); |
||
| 50 | |||
| 51 | return $fields; |
||
| 52 | } |
||
| 54 |