FormPrimitiveHtmlRenderer
HTML {@see ComponentRendererInterface} for the form-field primitive contract family — `input`, `textarea`, `select`, `checkbox`. Renders each field as an Alpine-bound control (`milpaField(...)` / `milpaCheckbox(...)`) wired to the signed state envelope, with shared label/hint/`aria-describedby` wiring across all four field types.
FormPrimitiveHtmlRenderer::__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 |
FormPrimitiveHtmlRenderer::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 |
FormPrimitiveHtmlRenderer::render()
public function render(Milpa\Live\Contracts\Component\ComponentDefinitionInterface $component, Milpa\Live\ValueObjects\RenderRequest $request): Milpa\Live\ValueObjects\RenderResultRenders one form-field-primitive component to HTML. Throws `InvalidArgumentException` if `$component`'s contract name is outside {@see self::SUPPORTED} (`input`, `textarea`, `select`, `checkbox`).
Parameters
| Name | Type | Description |
|---|---|---|
| $component | Milpa\Live\Contracts\Component\ComponentDefinitionInterface | |
| $request | Milpa\Live\ValueObjects\RenderRequest |