()
| 287 | } |
| 288 | |
| 289 | public static function getPublicConfig(): array |
| 290 | { |
| 291 | if (self::proSourcesAvailable()) { |
| 292 | return self::withCapabilities(ProSources::getPublicConfig()); |
| 293 | } |
| 294 | |
| 295 | $cfg = self::coreConfigFromRaw(self::loadRaw()); |
| 296 | $out = [ |
| 297 | 'enabled' => !empty($cfg['enabled']), |
| 298 | 'sources' => [], |
| 299 | ]; |
| 300 | |
| 301 | foreach ($cfg['sources'] as $src) { |
| 302 | if (empty($src['enabled'])) { |
| 303 | continue; |
| 304 | } |
| 305 | $view = self::buildSourceView($src, false, false); |
| 306 | unset($view['config']); |
| 307 | $out['sources'][] = $view; |
| 308 | } |
| 309 | |
| 310 | return self::withCapabilities($out); |
| 311 | } |
| 312 | |
| 313 | public static function getAdminList(): array |
| 314 | { |
no test coverage detected