API Documentation

HydePageDataFactory extends PageDataFactory
in package
implements PageSchema

Streamlines the data dynamic construction specific to a HydePHP page.

Simply pass along the data the class needs to run, then access the parsed data using the toArray() method.

Commonly, all data can be set using front matter in the page source file.

However, as all front matter is optional in Hyde, if no front matter is set for the given key, the factory may attempt to generate and discover the values based on the page's contents, as well as the project's overall configuration.

In other words, this is where the magic happens.

Table of Contents

Interfaces

PageSchema
Front matter schema interfaces are used by various Hyde components to specify what data they provide or contain. They also serve as a convenient way to see the supported front matter properties.

Constants

SCHEMA  = \Hyde\Markdown\Contracts\FrontMatter\PageSchema::PAGE_SCHEMA
The front matter properties supported by this factory.

Properties

$navigation  : NavigationData|null
$title  : string
$identifier  : string
$markdown  : Markdown|false
$matter  : FrontMatter
$pageData  : CoreDataObject

Methods

__construct()  : mixed
toArray()  : NavigationData|null}
Get the generated data as an associative array.
getMatter()  : string|null
makeNavigation()  : NavigationData
makeTitle()  : string
findTitleForPage()  : string
findTitleFromMarkdownHeadings()  : string|null
findTitleFromParentIdentifier()  : string|null

Constants

SCHEMA

The front matter properties supported by this factory.

public final array<string, string|array<string|int, mixed>> SCHEMA = \Hyde\Markdown\Contracts\FrontMatter\PageSchema::PAGE_SCHEMA

Properties

Methods

toArray()

Get the generated data as an associative array.

public toArray() : NavigationData|null}
Return values
NavigationData|null}

getMatter()

protected getMatter(string $key) : string|null
Parameters
$key : string
Return values
string|null

findTitleFromMarkdownHeadings()

private findTitleFromMarkdownHeadings() : string|null
Return values
string|null

findTitleFromParentIdentifier()

private findTitleFromParentIdentifier() : string|null
Return values
string|null

        
On this page

Search results