API Documentation

NavigationDataFactory extends PageDataFactory
in package
implements NavigationSchema

Discover data used for navigation menus and the documentation sidebar.

Table of Contents

Interfaces

NavigationSchema
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\SubSchemas\NavigationSchema::NAVIGATION_SCHEMA
The front matter properties supported by this factory.
CONFIG_OFFSET  = 500
FALLBACK_PRIORITY  = 999

Properties

$group  : string|null
$hidden  : bool|null
$label  : string|null
$priority  : int|null
$identifier  : string
$matter  : FrontMatter
$pageClass  : string
$routeKey  : string
$title  : string

Methods

__construct()  : mixed
toArray()  : array{label: string|null, group: string|null, hidden: bool|null, priority: int|null}
Get the generated data as an associative array.
getMatter()  : string|null|int|bool
getSubdirectoryConfiguration()  : string
invert()  : bool|null
isInstanceOf()  : bool
makeGroup()  : string|null
makeHidden()  : bool
makeLabel()  : string|null
makePriority()  : int
offset()  : int|null
canUseSubdirectoryForGroups()  : bool
defaultGroup()  : string|null
getSubdirectoryName()  : string
isNonDocumentationPageInHiddenSubdirectory()  : bool
isPageHiddenInNavigationConfiguration()  : bool
pageIsInSubdirectory()  : bool
parseNavigationPriorityConfig()  : int|null
searchForGroupInFrontMatter()  : string|null
searchForHiddenInFrontMatter()  : bool|null
searchForLabelInConfig()  : string|null
searchForLabelInFrontMatter()  : string|null
searchForPriorityInConfigs()  : int|null
searchForPriorityInFrontMatter()  : int|null
searchForPriorityInNavigationConfig()  : int|null
searchForPriorityInSidebarConfig()  : int|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\SubSchemas\NavigationSchema::NAVIGATION_SCHEMA

Note that this represents a sub-schema, and is used as part of the page schema.

Properties

Methods

toArray()

Get the generated data as an associative array.

public toArray() : array{label: string|null, group: string|null, hidden: bool|null, priority: int|null}
Return values
array{label: string|null, group: string|null, hidden: bool|null, priority: int|null}

getMatter()

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

getSubdirectoryConfiguration()

protected getSubdirectoryConfiguration() : string
Return values
string

invert()

protected invert(bool|null $value) : bool|null
Parameters
$value : bool|null
Return values
bool|null

isInstanceOf()

protected isInstanceOf(HydePage> $class) : bool
Parameters
$class : HydePage>
Return values
bool

offset()

protected offset(int|null $value, int $offset) : int|null
Parameters
$value : int|null
$offset : int
Return values
int|null

canUseSubdirectoryForGroups()

private canUseSubdirectoryForGroups() : bool
Return values
bool

isNonDocumentationPageInHiddenSubdirectory()

private isNonDocumentationPageInHiddenSubdirectory() : bool
Return values
bool

isPageHiddenInNavigationConfiguration()

private isPageHiddenInNavigationConfiguration() : bool
Return values
bool

parseNavigationPriorityConfig()

private parseNavigationPriorityConfig(array<string, int>|array<string|int, string> $config, "routeKey"|"identifier" $pageKeyName) : int|null
Parameters
$config : array<string, int>|array<string|int, string>
$pageKeyName : "routeKey"|"identifier"
Return values
int|null

searchForGroupInFrontMatter()

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

searchForHiddenInFrontMatter()

private searchForHiddenInFrontMatter() : bool|null
Return values
bool|null

searchForLabelInConfig()

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

searchForLabelInFrontMatter()

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

searchForPriorityInConfigs()

private searchForPriorityInConfigs() : int|null
Return values
int|null

searchForPriorityInFrontMatter()

private searchForPriorityInFrontMatter() : int|null
Return values
int|null

searchForPriorityInNavigationConfig()

private searchForPriorityInNavigationConfig() : int|null
Return values
int|null

searchForPriorityInSidebarConfig()

private searchForPriorityInSidebarConfig() : int|null
Return values
int|null

        
On this page

Search results