HeadRenderer
class HeadRenderer
Properties
| protected TagRenderer | $tags |
Methods
Create the head renderer.
Render the initial Inertia document head as an HTML string.
Render the resolved head as individual HTML element strings.
Render the resolved head as individual HTML element strings with stable data-inertia keys for Inertia's server-managed head reconciler.
Remove exact Inertia elements from an HTML string.
Render the initial Inertia document head. Inertia globals are emitted as plain, server-owned tags while page tags receive Inertia ownership keys.
Apply Inertia's last-write-wins ownership semantics to rendered elements.
Render every builder in the resolved head.
Details
at line 22
__construct(SchemaValidator $schemas, TagRegistry $registry, TagRenderer|null $tags = null)
Create the head renderer.
at line 33
string
render(HeadData $head, Request|null $request = null)
Render the resolved head as an HTML string.
at line 41
string
renderInertiaDocument(HeadData $inertiaGlobals, HeadData $head, Request|null $request = null)
Render the initial Inertia document head as an HTML string.
at line 51
array
toElements(HeadData $head, Request|null $request = null)
Render the resolved head as individual HTML element strings.
at line 62
array
toInertiaElements(HeadData $head, Request|null $request = null)
Render the resolved head as individual HTML element strings with stable data-inertia keys for Inertia's server-managed head reconciler.
at line 74
string
withoutInertiaElements(string $html, array $elements)
Remove exact Inertia elements from an HTML string.
at line 85
array
toInertiaDocumentElements(HeadData $inertiaGlobals, HeadData $head, Request|null $request = null)
Render the initial Inertia document head. Inertia globals are emitted as plain, server-owned tags while page tags receive Inertia ownership keys.
at line 99
protected array
uniqueInertiaElements(array $elements)
Apply Inertia's last-write-wins ownership semantics to rendered elements.
at line 136
protected array
elements(HeadData $head, Request|null $request, TagRenderer $tags)
Render every builder in the resolved head.