PageMetadataBag
extends MetadataBag
in package
Holds the metadata tags for a page or the site model.
Table of Contents
Properties
- $generics : array<string|int, string>
- $links : array<string, MetadataElementContract>
- $metadata : array<string, MetadataElementContract>
- $page : HydePage
- $properties : array<string, MetadataElementContract>
Methods
- __construct() : mixed
- add() : static
- get() : array<string|int, mixed>
- render() : string
- toHtml() : string
- addDynamicPageMetadata() : void
- addGenericElement() : void
- addMetadataForMarkdownPost() : void
- addPostMetadataIfExists() : void
- generate() : void
- getPrefixedArray() : array<string, MetadataElementContract>
- resolveImageLink() : string
- calculatePathTraversal() : string
Properties
$generics
protected
array<string|int, string>
$generics
= []
$links
protected
array<string, MetadataElementContract>
$links
= []
$metadata
protected
array<string, MetadataElementContract>
$metadata
= []
$page
protected
HydePage
$page
$properties
protected
array<string, MetadataElementContract>
$properties
= []
Methods
__construct()
public
__construct(HydePage $page) : mixed
Parameters
- $page : HydePage
add()
public
add(MetadataElementContract|string $element) : static
Parameters
- $element : MetadataElementContract|string
Return values
staticget()
public
get() : array<string|int, mixed>
Return values
array<string|int, mixed>render()
public
render() : string
Return values
stringtoHtml()
public
toHtml() : string
Return values
stringaddDynamicPageMetadata()
protected
addDynamicPageMetadata(HydePage $page) : void
Parameters
- $page : HydePage
addGenericElement()
protected
addGenericElement(string $element) : void
Parameters
- $element : string
addMetadataForMarkdownPost()
protected
addMetadataForMarkdownPost(MarkdownPost $page) : void
Parameters
- $page : MarkdownPost
addPostMetadataIfExists()
protected
addPostMetadataIfExists(MarkdownPost $page, string $property[, string|null $name = null ]) : void
Parameters
- $page : MarkdownPost
- $property : string
- $name : string|null = null
generate()
protected
generate() : void
getPrefixedArray()
protected
getPrefixedArray(string $type) : array<string, MetadataElementContract>
Parameters
- $type : string
Return values
array<string, MetadataElementContract>resolveImageLink()
protected
resolveImageLink(string $image) : string
Parameters
- $image : string
Return values
stringcalculatePathTraversal()
private
calculatePathTraversal() : string