Guides

PagesRegistry
in package

FinalYes

Shared state carrier between the parse and render event listeners.

Stores two separate collections:

RenderPagesListener reads both collections back during the post-render phase via getAllRenderables() to write the final HTML output.

This service must be registered as a shared singleton in the DI container so that all listeners operate on the same instance.

Table of Contents

Properties

$collectionItems  : array<string, ContentTypeItemNode[]>
Content-type items grouped by collection key (source_directory).
$overviews  : array<string, ContentTypeOverviewNode>
Overview nodes keyed by outputPath.
$pages  : PageNode[]

Methods

addCollectionItem()  : void
addOverview()  : void
addPage()  : void
getAllRenderables()  : RenderablePageInterface[]
Returns all static pages **and** all content-type items as a flat list of {@see RenderablePageInterface} instances.
getCollectionItems()  : ContentTypeItemNode[]
Returns all items for a collection in their original (parse) order.
getPages()  : PageNode[]
getSortedCollectionItems()  : ContentTypeItemNode[]
Returns all items for a collection sorted **newest-first** by publication date. Items without a date sort after all dated items, preserving their relative parse order among themselves.
updateCollectionItems()  : void
updatePages()  : void

Properties

Methods

getSortedCollectionItems()

Returns all items for a collection sorted **newest-first** by publication date. Items without a date sort after all dated items, preserving their relative parse order among themselves.

public getSortedCollectionItems(string $collectionKey) : ContentTypeItemNode[]
Parameters
$collectionKey : string
Return values
ContentTypeItemNode[]
On this page

Search results