NullContextBreadcrumbProvider

final readonly class \TYPO3\CMS\Backend\Breadcrumb\NullContextBreadcrumbProvider

Implements
BreadcrumbProviderInterface

Breadcrumb provider for null contexts (virtual pages, empty states).

Provides fallback breadcrumbs when no record or resource context is available, such as virtual pages (e.g., id=0) or file storage roots.

Table of Contents

Interfaces

BreadcrumbProviderInterface
Interface for breadcrumb providers that can generate breadcrumb trails for different types of contexts (records, resources, etc.).

Methods

__construct()  : mixed
generate()  : BreadcrumbNode[]
Generates breadcrumb nodes for the given context.
getPriority()  : int
Returns the priority of this provider.
supports()  : bool
Determines whether this provider can handle the given context.

Methods

generate()

Generates breadcrumb nodes for the given context.

public generate(BreadcrumbContext|null $context, ServerRequestInterface|null $request) : BreadcrumbNode[]

Parameters

$context : BreadcrumbContext|null

The breadcrumb context (can be null for virtual pages)

$request : ServerRequestInterface|null

The current request for module detection

Return values

BreadcrumbNode[] —

Array of breadcrumb nodes ordered from root to current

getPriority()

Returns the priority of this provider.

public getPriority() : int

Higher priority providers are checked first. Use this to override default providers or to establish a specific order.

Return values

int —

Priority (higher = checked first)

supports()

Determines whether this provider can handle the given context.

public supports(BreadcrumbContext|null $context) : bool

Parameters

$context : BreadcrumbContext|null

The breadcrumb context (can be null for virtual pages)

Return values

bool
On this page