AutocompleteHtmlRenderer
HTML {@see ComponentRendererInterface} for the `autocomplete` contract: an Alpine-bound `<input>` + listbox pair driven by `milpaAutocomplete(...)`, boot-configured with the component's source/endpoint/persistence options and the signed state envelope the client echoes back on every interaction.
AutocompleteHtmlRenderer::__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 |
AutocompleteHtmlRenderer::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 |
AutocompleteHtmlRenderer::render()
public function render(Milpa\Live\Contracts\Component\ComponentDefinitionInterface $component, Milpa\Live\ValueObjects\RenderRequest $request): Milpa\Live\ValueObjects\RenderResultRenders one `autocomplete` component to HTML. Throws `InvalidArgumentException` if `$component`'s contract name is anything other than `"autocomplete"` — this renderer is intentionally single- purpose, not a generic dispatcher.
Parameters
| Name | Type | Description |
|---|---|---|
| $component | Milpa\Live\Contracts\Component\ComponentDefinitionInterface | |
| $request | Milpa\Live\ValueObjects\RenderRequest |