MCPcopy Create free account
hub / github.com/error311/FileRise / getAdminList

Method getAdminList

src/FileRise/Storage/SourcesConfig.php:313–330  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

311 }
312
313 public static function getAdminList(): array
314 {
315 if (self::proSourcesAvailable()) {
316 return self::withCapabilities(ProSources::getAdminList());
317 }
318
319 $cfg = self::coreConfigFromRaw(self::loadRaw());
320 $out = [
321 'enabled' => !empty($cfg['enabled']),
322 'sources' => [],
323 ];
324
325 foreach ($cfg['sources'] as $src) {
326 $out['sources'][] = self::buildSourceView($src, false, true);
327 }
328
329 return self::withCapabilities($out);
330 }
331
332 public static function getSource(?string $id): ?array
333 {

Callers 2

listGatewaysMethod · 0.80
listSourcesMethod · 0.80

Calls 5

proSourcesAvailableMethod · 0.95
withCapabilitiesMethod · 0.95
coreConfigFromRawMethod · 0.95
loadRawMethod · 0.95
buildSourceViewMethod · 0.95

Tested by

no test coverage detected