Documentation

PageContentTrait

Implements PageContentInterface.

Table of Contents

Properties

$_content  : string|null
$_summary  : string|null
$calculatedProperties  : array<string|int, mixed>
$header  : object|null
$headerProperties  : array<string|int, mixed>

Methods

content()  : string
date()  : int
dateformat()  : string|null
getRawContent()  : string
header()  : Header
id()  : string
isDir()  : bool
isModule()  : bool
isPage()  : bool
lastModified()  : bool
media()  : Media
menu()  : string
modified()  : int
order()  : mixed
process()  : array<string|int, mixed>
publishDate()  : int|null
published()  : bool
rawMarkdown()  : string
setRawContent()  : void
setSummary()  : void
shouldProcess()  : bool
slug()  : mixed
summary()  : string
taxonomy()  : array<string|int, mixed>
title()  : string
unpublishDate()  : int|null
value()  : mixed
visible()  : bool
loadHeaderProperty()  : mixed
offsetLoad_header()  : Header
offsetPrepare_header()  : Header
offsetSerialize_header()  : array<string|int, mixed>
pageContentValue()  : mixed
processContent()  : string
Gets and Sets the content based on content portion of the .md file
processMarkdown()  : string
Process the Markdown content.
processSummary()  : string
processTwig()  : string
Process the Twig page content.

Properties

$calculatedProperties

protected static array<string|int, mixed> $calculatedProperties = ['name' => 'name', 'parent' => 'parent', 'parent_key' => 'parentStorageKey', 'folder' => 'folder', 'order' => 'order', 'template' => 'template']

$headerProperties

protected static array<string|int, mixed> $headerProperties = ['slug' => 'slug', 'routes' => false, 'title' => 'title', 'language' => 'language', 'template' => 'template', 'menu' => 'menu', 'routable' => 'routable', 'visible' => 'visible', 'redirect' => 'redirect', 'external_url' => false, 'order_dir' => 'orderDir', 'order_by' => 'orderBy', 'order_manual' => 'orderManual', 'dateformat' => 'dateformat', 'date' => 'date', 'markdown_extra' => false, 'taxonomy' => 'taxonomy', 'max_count' => 'maxCount', 'process' => 'process', 'published' => 'published', 'publish_date' => 'publishDate', 'unpublish_date' => 'unpublishDate', 'expires' => 'expires', 'cache_control' => 'cacheControl', 'etag' => 'eTag', 'last_modified' => 'lastModified', 'ssl' => 'ssl', 'template_format' => 'templateFormat', 'debugger' => false]

Methods

content()

public content([mixed $var = null ]) : string
Parameters
$var : mixed = null
Tags
inheritdoc
throws
Exception
Return values
string

date()

public date([mixed $var = null ]) : int
Parameters
$var : mixed = null
Tags
inheritdoc
Return values
int

dateformat()

public dateformat([mixed $var = null ]) : string|null
Parameters
$var : mixed = null
Tags
inheritdoc
Return values
string|null

getRawContent()

public getRawContent() : string
Tags
inheritdoc
Return values
string

id()

public id([mixed $var = null ]) : string
Parameters
$var : mixed = null
Tags
inheritdoc
Return values
string

lastModified()

public lastModified([mixed $var = null ]) : bool
Parameters
$var : mixed = null
Tags
inheritdoc
Return values
bool

menu()

public menu([mixed $var = null ]) : string
Parameters
$var : mixed = null
Tags
inheritdoc
Return values
string

modified()

public modified([mixed $var = null ]) : int
Parameters
$var : mixed = null
Tags
inheritdoc
Return values
int

order()

public order([mixed $var = null ]) : mixed
Parameters
$var : mixed = null
Tags
inheritdoc

process()

public process([mixed $var = null ]) : array<string|int, mixed>
Parameters
$var : mixed = null
Tags
inheritdoc
Return values
array<string|int, mixed>

publishDate()

public publishDate([mixed $var = null ]) : int|null
Parameters
$var : mixed = null
Tags
inheritdoc
Return values
int|null

published()

public published([mixed $var = null ]) : bool
Parameters
$var : mixed = null
Tags
inheritdoc
Return values
bool

rawMarkdown()

public rawMarkdown([mixed $var = null ]) : string
Parameters
$var : mixed = null
Tags
inheritdoc
Return values
string

setRawContent()

public setRawContent(mixed $content) : void
Parameters
$content : mixed
Tags
inheritdoc

setSummary()

public setSummary(mixed $summary) : void
Parameters
$summary : mixed
Tags
inheritdoc

shouldProcess()

public shouldProcess(mixed $process) : bool
Parameters
$process : mixed
Tags
inheritdoc
Return values
bool

slug()

public slug([mixed $var = null ]) : mixed
Parameters
$var : mixed = null
Tags
inheritdoc

summary()

public summary([mixed $size = null ][, mixed $textOnly = false ]) : string
Parameters
$size : mixed = null
$textOnly : mixed = false
Tags
inheritdoc
Return values
string

taxonomy()

public taxonomy([mixed $var = null ]) : array<string|int, mixed>
Parameters
$var : mixed = null
Tags
inheritdoc
Return values
array<string|int, mixed>

title()

public title([mixed $var = null ]) : string
Parameters
$var : mixed = null
Tags
inheritdoc
Return values
string

unpublishDate()

public unpublishDate([mixed $var = null ]) : int|null
Parameters
$var : mixed = null
Tags
inheritdoc
Return values
int|null

value()

public abstract value(mixed $name[, mixed $default = null ][, mixed $separator = null ]) : mixed
Parameters
$name : mixed
$default : mixed = null
$separator : mixed = null
Tags
inheritdoc

Implement by calling:

$test = new \stdClass(); $value = $this->pageContentValue($name, $test); if ($value !== $test) { return $value; } return parent::value($name, $default);

visible()

public visible([mixed $var = null ]) : bool
Parameters
$var : mixed = null
Tags
inheritdoc
Return values
bool

loadHeaderProperty()

protected abstract loadHeaderProperty(string $property, mixed $var, callable $filter) : mixed
Parameters
$property : string
$var : mixed
$filter : callable

offsetLoad_header()

protected offsetLoad_header(Header|stdClass|array<string|int, mixed>|null $value) : Header
Parameters
$value : Header|stdClass|array<string|int, mixed>|null
Return values
Header

offsetPrepare_header()

protected offsetPrepare_header(Header|stdClass|array<string|int, mixed>|null $value) : Header
Parameters
$value : Header|stdClass|array<string|int, mixed>|null
Return values
Header

offsetSerialize_header()

protected offsetSerialize_header(Header|null $value) : array<string|int, mixed>
Parameters
$value : Header|null
Return values
array<string|int, mixed>

pageContentValue()

protected pageContentValue(string $name[, mixed|null $default = null ]) : mixed
Parameters
$name : string
$default : mixed|null = null

processContent()

Gets and Sets the content based on content portion of the .md file

protected processContent(string $content) : string
Parameters
$content : string
Tags
throws
Exception
Return values
string

processMarkdown()

Process the Markdown content.

protected processMarkdown(string $content[, array<string|int, mixed> $options = [] ]) : string

Uses Parsedown or Parsedown Extra depending on configuration.

Parameters
$content : string
$options : array<string|int, mixed> = []
Tags
throws
Exception
Return values
string

processSummary()

protected processSummary([int|null $size = null ][, bool $textOnly = false ]) : string
Parameters
$size : int|null = null
$textOnly : bool = false
Return values
string

processTwig()

Process the Twig page content.

protected processTwig(string $content) : string
Parameters
$content : string
Return values
string

        
On this page

Search results