final class BreadcrumbComponent (View source)

Creates application-supplied breadcrumb trails and renders them through the framework's canonical breadcrumb renderer.

Methods

Initializes the component with the renderer shared by views and callers.

empty()

Starts an empty trail so the caller can define its own navigation roots and items.

string
render(BreadcrumbTrail|null $trail)

Renders a trail or returns an empty string when no trail is available.

string

Details

__construct

__construct(BreadcrumbRenderer $renderer)

Initializes the component with the renderer shared by views and callers.

Parameters

BreadcrumbRenderer $renderer

empty

Starts an empty trail so the caller can define its own navigation roots and items.

Return Value

BreadcrumbTrail

render

string render(BreadcrumbTrail|null $trail)

Renders a trail or returns an empty string when no trail is available.

Parameters

BreadcrumbTrail|null $trail

Return Value

string