final class BreadcrumbItem (View source)

Stores one caller-owned breadcrumb label and its optional navigable URL.

Methods

__construct(string $label, string|null $url = null)

Initializes the immutable label and optional URL displayed by a trail.

string
label()

Returns the already-localized label supplied by the caller.

string
string|null
url()

Returns the caller-provided URL or null when the item is not navigable.

string|null

Details

__construct

__construct(string $label, string|null $url = null)

Initializes the immutable label and optional URL displayed by a trail.

Parameters

string $label
string|null $url

label

string label()

Returns the already-localized label supplied by the caller.

Return Value

string

url

string|null url()

Returns the caller-provided URL or null when the item is not navigable.

Return Value

string|null