Skip to content
docsv0.34.0

AdminSectionStates

Every section of the panel, offered to the terminal — the ONE implementation that puts the whole panel in a second surface (greenhouse decisions/0220). The terminal's dashboard (`milpa/console`'s `InspectableSections` → `ConsoleScreen`) discovers state from booted plugins implementing {@see SectionStateSource}. If each plugin had to implement it, every plugin would declare its section TWICE — once for the panel, once for the terminal — which is the exact thing 0220 refuses. So the panel implements it ONCE, for everyone: it already discovers every section every request ({@see SectionCatalogue}), its own and every guest's, and that catalogue is what it hands over. A plugin declares an `AdminSection` and gains a terminal it never mentioned. Discovery runs per call, like the panel's own, so a plugin that boots after the panel is still there.

AdminSectionStates::__construct()

public function __construct(Milpa\Interfaces\Di\DIContainerInterface $container, object $self, Milpa\Live\Contracts\Transport\StateTransferCodecInterface $codec, string $route, ?Milpa\Interfaces\Event\MilpaEventDispatcherInterface $events = null):

Parameters

Parameters of __construct()
NameTypeDescription
$containerMilpa\Interfaces\Di\DIContainerInterface
$selfobjectthe admin plugin instance — the one provider the panel can count on without a kernel
$codecMilpa\Live\Contracts\Transport\StateTransferCodecInterface
$routestring
$events?Milpa\Interfaces\Event\MilpaEventDispatcherInterface

AdminSectionStates::sectionStates()

public function sectionStates(): array

Every section the panel would show, keyed by id — each one a provider that mounts on demand.