class ResolvedHead implements Transient

Methods

__construct(HeadData $data, TagRegistry $registry, Request|null $request = null, SchemaValidator|null $schemas = null)

Create a resolved view of the page metadata.

data()

Get the resolved head data.

Request|null
request()

Get the request used for rendering.

void
validateSchema(array $schema)

Validate a structured data definition.

string|null
title()

Get the resolved title.

string|null
description()

Get the resolved description.

string|null
canonical()

Get the resolved canonical URL.

string|null
robots()

Get the resolved robots directives.

array|null
openGraphImage()

Get the first Open Graph image and its alternative text.

array
builders()

Get the tag builders to render, in declared order, including those that derive their values from the rest of the head even when never set explicitly.

mixed
headArray(string $builder)

Resolve one tag builder into its Head::toArray() value, including defaults for builder data that was never set.

TagBuilder|null
builder(string $builder)

Get an existing tag builder from the resolved data.

Details

at line 25
__construct(HeadData $data, TagRegistry $registry, Request|null $request = null, SchemaValidator|null $schemas = null)

Create a resolved view of the page metadata.

Parameters

HeadData $data
TagRegistry $registry
Request|null $request
SchemaValidator|null $schemas

at line 36
HeadData data()

Get the resolved head data.

Return Value

HeadData

at line 44
Request|null request()

Get the request used for rendering.

Return Value

Request|null

at line 54
void validateSchema(array $schema)

Validate a structured data definition.

Parameters

array $schema

Return Value

void

at line 62
string|null title()

Get the resolved title.

Return Value

string|null

at line 72
string|null description()

Get the resolved description.

Return Value

string|null

at line 82
string|null canonical()

Get the resolved canonical URL.

Return Value

string|null

at line 92
string|null robots()

Get the resolved robots directives.

Return Value

string|null

at line 104
array|null openGraphImage()

Get the first Open Graph image and its alternative text.

Return Value

array|null

at line 126
array builders()

Get the tag builders to render, in declared order, including those that derive their values from the rest of the head even when never set explicitly.

Return Value

array

at line 149
mixed headArray(string $builder)

Resolve one tag builder into its Head::toArray() value, including defaults for builder data that was never set.

Parameters

string $builder

Return Value

mixed

at line 165
TagBuilder|null builder(string $builder)

Get an existing tag builder from the resolved data.

Parameters

string $builder

Return Value

TagBuilder|null