BreadcrumbTrail
final class BreadcrumbTrail (View source)
Holds ordered caller-owned breadcrumb items until a renderer presents them.
Methods
add(string $label, string|null $url = null)
Appends one item after existing trail items.
prepend(string $label, string|null $url = null)
Inserts one item before all existing trail items.
clear()
Removes every item while preserving the mutable trail instance.
count()
Returns the number of items in display order.
int
items()
Returns the ordered items without applying presentation-specific state.
array
Details
add
BreadcrumbTrail
add(string $label, string|null $url = null)
Appends one item after existing trail items.
prepend
BreadcrumbTrail
prepend(string $label, string|null $url = null)
Inserts one item before all existing trail items.
count
int
count()
Returns the number of items in display order.
items
array
items()
Returns the ordered items without applying presentation-specific state.