Parent Page > "Create New Content") * $suffixNode = new BreadcrumbNode(identifier: 'new', label: 'Create New Content'); * $context = new BreadcrumbContext($parentPage, [$suffixNode]); * * @internal Subject to change until v15 LTS */ final readonly class BreadcrumbContext { /** * @param RecordInterface|ResourceInterface|null $mainContext The main entity (record or resource) * @param BreadcrumbNode[] $suffixNodes Additional nodes to append after the main breadcrumb trail */ public function __construct( public RecordInterface|ResourceInterface|null $mainContext, public array $suffixNodes = [], ) {} /** * Checks if this context has a valid main entity. */ public function hasContext(): bool { return $this->mainContext !== null; } /** * Checks if this context has suffix nodes. */ public function hasSuffixNodes(): bool { return $this->suffixNodes !== []; } }