Skip to content
docsv0.34.0

SettingsSource

What the app declared about its panel, as the Settings section shows it: one row per key with the value the panel is using, where it came from, and — when the panel refused what was declared — what the app wrote. Pure — it reads the {@see AdminSettings} the panel booted with and nothing else. Values are shown as declared (route, locale, title verbatim; middleware as class names), except the secret: its row carries only where it came from, never the value nor a fragment of it. A declared middleware list is shown entry by entry — short names for the classes that load, the whole name for a typo, the type for an entry that is not a name, `(empty)` for an empty string — and every defect is listed in `unresolved`, so the renderer can say the panel fell back to the strict gate (greenhouse decisions/0204). The `gate` is what the panel NAMES it ({@see AdminSettings::gateLabel()}): app-runtime's passkey gate, alone, is `passkey`; and the empty state offers that gate as the alternative of its snippet — the same `admin` key whole, with the passkey gate as its middleware, so it pastes as-is (decisions/0206).

SettingsSource::__construct()

public function __construct(Milpa\Admin\AdminSettings $settings):

Parameters

Parameters of __construct()
NameTypeDescription
$settingsMilpa\Admin\AdminSettings

SettingsSource::snapshot()

public function snapshot(): array

The five rows, the gate as the panel names it, whether the app declared anything, whether the gate was malformed, and the snippet to paste when the app declared nothing — plus the same key with the passkey gate, the alternative it offers whole.

SettingsSource::passkeySnippet()

public static function passkeySnippet(): string

The `admin` key that puts the panel behind app-runtime's passkey gate — the alternative the empty state offers: the whole line, not a fragment, so it replaces {@see self::snippet()} pasted as-is.

SettingsSource::snippet()

public static function snippet(): string

The `admin` key a fresh app pastes into `config/app.php` — the defaults, spelled out.