API Documentation

InteractsWithFrontMatter

Adds methods to a class to allow it to fluently interact with its front matter.

Table of Contents

Methods

data()  : FrontMatter|mixed
Get a value from the computed page data, or fallback to the page's front matter, then to the default value.
has()  : bool
See if a value exists in the computed page data or the front matter.
matter()  : FrontMatter|mixed
Get the front matter object, or a value from within.

Methods

data()

Get a value from the computed page data, or fallback to the page's front matter, then to the default value.

public data([string $key = null ][, mixed $default = null ]) : FrontMatter|mixed
Parameters
$key : string = null
$default : mixed = null
Return values
FrontMatter|mixed

has()

See if a value exists in the computed page data or the front matter.

public has(string $key) : bool
Parameters
$key : string
Return values
bool

matter()

Get the front matter object, or a value from within.

public matter([string $key = null ][, mixed $default = null ]) : FrontMatter|mixed
Parameters
$key : string = null
$default : mixed = null
Return values
FrontMatter|mixed

        
On this page

Search results