DashboardHtmlRenderer
HTML {@see ComponentRendererInterface} for the dashboard-primitive contract family — shell, sidebar, main, topbar, grid, panel, page header, action button, alert list, metric card, and data table. One renderer fans out to a private per-primitive method (`shell()`, `sidebar()`, …) that builds the Latte params for that primitive's template; the public surface stays the single {@see render()} entrypoint every primitive shares via its contract name.
DashboardHtmlRenderer::__construct()
public function __construct(Milpa\Live\Contracts\Client\ClientRuntimeAdapterInterface $client, Milpa\Live\Contracts\Transport\StateTransferCodecInterface $codec, ?Milpa\Live\Contracts\Rendering\TemplateRendererInterface $templates = null, ?Milpa\Interfaces\Event\MilpaEventDispatcherInterface $dispatcher = null):Parameters
| Name | Type | Description |
|---|---|---|
| $client | Milpa\Live\Contracts\Client\ClientRuntimeAdapterInterface | |
| $codec | Milpa\Live\Contracts\Transport\StateTransferCodecInterface | |
| $templates | ?Milpa\Live\Contracts\Rendering\TemplateRendererInterface | |
| $dispatcher | ?Milpa\Interfaces\Event\MilpaEventDispatcherInterface |
DashboardHtmlRenderer::supportsTarget()
public function supportsTarget(Milpa\Live\ValueObjects\RenderTarget $target): boolTrue only for {@see RenderTarget::HTML} — this renderer produces server-rendered markup, not another target format.
Parameters
| Name | Type | Description |
|---|---|---|
| $target | Milpa\Live\ValueObjects\RenderTarget |
DashboardHtmlRenderer::render()
public function render(Milpa\Live\Contracts\Component\ComponentDefinitionInterface $component, Milpa\Live\ValueObjects\RenderRequest $request): Milpa\Live\ValueObjects\RenderResultRenders one dashboard-primitive component to HTML, dispatching on the component's contract name to the matching private builder (`shell()`, `sidebar()`, `main()`, …). Throws `InvalidArgumentException` if the contract name is outside {@see self::SUPPORTED}.
Parameters
| Name | Type | Description |
|---|---|---|
| $component | Milpa\Live\Contracts\Component\ComponentDefinitionInterface | |
| $request | Milpa\Live\ValueObjects\RenderRequest |