ModifyTocPageEntry
in package
FinalYes
One page of "toc.json", before it is written.
Dispatched for every page, the orphans included, with what the renderer could say about it on its own: where it is, which files it was rendered to, its title and its anchor. A theme that knows more about a page -- a permalink, a deprecation, a content type -- adds it here.
The page's own children are not in the descriptor yet: they are added after this event, so that a listener cannot be surprised by a page it did not put there. ModifyTocPageEntry::getDocumentEntry() still reaches them, and each of them is dispatched in turn.
Table of Contents
Properties
Methods
- __construct() : mixed
- getDocument() : DocumentNode|null
- getDocumentEntry() : DocumentEntryNode
- getPage() : PageDescriptor
Properties
$document read-only
private
DocumentNode|null
$document
$documentEntry read-only
private
DocumentEntryNode
$documentEntry
$page read-only
private
PageDescriptor
$page
Methods
__construct()
public
__construct(PageDescriptor $page, DocumentEntryNode $documentEntry, DocumentNode|null $document) : mixed
Parameters
- $page : PageDescriptor
- $documentEntry : DocumentEntryNode
- $document : DocumentNode|null
-
the parsed page, absent when the table of contents names a page that was not rendered in this run
getDocument()
public
getDocument() : DocumentNode|null
Return values
DocumentNode|nullgetDocumentEntry()
public
getDocumentEntry() : DocumentEntryNode
Return values
DocumentEntryNodegetPage()
public
getPage() : PageDescriptor