Skip to content
docsv0.34.0

AdminHtmlRenderer

Paints the panel's own components — `admin-plugins`, `admin-routes`, `admin-settings`, `admin-stack` and `admin-devtools` — as HTML on the `mui-*` design classes, and closes each with its signed state envelope like every Milpa component. Every string a human reads comes from the {@see Catalog} — the one the request's {@see ComponentContext} names by locale, else the one the renderer booted with; every value from the state is escaped; the links it emits (the compose file, a session's timeline, the way back) are built from the declared {@see AdminSettings}, and carry `?lang=` when the request overrode the locale, so a drill-down keeps answering in the language it was opened in. The Dev tools envelope is the exception to «the state as mounted»: what travels is {@see DevToolsComponent::envelope()} — `{view, session}` — and a request that carries that envelope re-mounts through {@see DevToolsComponent::propsOf()} instead of painting an envelope that holds no ledger.

AdminHtmlRenderer::__construct()

public function __construct(Milpa\Live\Contracts\Transport\StateTransferCodecInterface $codec, Milpa\Admin\I18n\Catalog $catalog, Milpa\Admin\AdminSettings $settings):

Parameters

Parameters of __construct()
NameTypeDescription
$codecMilpa\Live\Contracts\Transport\StateTransferCodecInterface
$catalogMilpa\Admin\I18n\Catalog
$settingsMilpa\Admin\AdminSettings

AdminHtmlRenderer::supportsTarget()

public function supportsTarget(Milpa\Live\ValueObjects\RenderTarget $target): bool

HTML only — the TUI projection is a later slice.

Parameters

Parameters of supportsTarget()
NameTypeDescription
$targetMilpa\Live\ValueObjects\RenderTarget

AdminHtmlRenderer::render()

public function render(Milpa\Live\Contracts\Component\ComponentDefinitionInterface $component, Milpa\Live\ValueObjects\RenderRequest $request): Milpa\Live\ValueObjects\RenderResult

Mounts (unless the request carries state) and paints the component the contract names. A Dev tools request that carries state carries the travelling `{view, session}` and is re-mounted from it.

Parameters

Parameters of render()
NameTypeDescription
$componentMilpa\Live\Contracts\Component\ComponentDefinitionInterface
$requestMilpa\Live\ValueObjects\RenderRequest