BreadcrumbContext

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

Represents a breadcrumb context with the main entity and optional suffix nodes.

A breadcrumb context consists of:

  • A main context (record or resource) that determines the base breadcrumb trail
  • Optional suffix nodes that are appended after the main trail

Suffix nodes are useful for:

  • "New Record" indicators when creating records
  • "Edit Multiple" indicators when editing multiple records
  • Custom action indicators

Example usage:

// Edit existing record
$context = new BreadcrumbContext($record, []);

// Create new record (shows: Pages > Parent Page > "Create New Content")
$suffixNode = new BreadcrumbNode(identifier: 'new', label: 'Create New Content');
$context = new BreadcrumbContext($parentPage, [$suffixNode]);

Table of Contents

Properties

$mainContext  : RecordInterface|ResourceInterface|null
$suffixNodes  : array

Methods

__construct()  : mixed
hasContext()  : bool
Checks if this context has a valid main entity.
hasSuffixNodes()  : bool
Checks if this context has suffix nodes.

Properties

$suffixNodes

public array $suffixNodes = []

Methods

hasContext()

Checks if this context has a valid main entity.

public hasContext() : bool

Return values

bool

hasSuffixNodes()

Checks if this context has suffix nodes.

public hasSuffixNodes() : bool

Return values

bool
On this page