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
$_content
protected
string|null
$_content
$_summary
protected
string|null
$_summary
$calculatedProperties
protected
static array<string|int, mixed>
$calculatedProperties
= ['name' => 'name', 'parent' => 'parent', 'parent_key' => 'parentStorageKey', 'folder' => 'folder', 'order' => 'order', 'template' => 'template']
$header
protected
object|null
$header
$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
Return values
stringdate()
public
date([mixed $var = null ]) : int
Parameters
- $var : mixed = null
Tags
Return values
intdateformat()
public
dateformat([mixed $var = null ]) : string|null
Parameters
- $var : mixed = null
Tags
Return values
string|nullgetRawContent()
public
getRawContent() : string
Tags
Return values
stringheader()
public
header([mixed $var = null ]) : Header
Parameters
- $var : mixed = null
Tags
Return values
Headerid()
public
id([mixed $var = null ]) : string
Parameters
- $var : mixed = null
Tags
Return values
stringisDir()
public
isDir() : bool
Tags
Return values
boolisModule()
public
isModule() : bool
Return values
boolisPage()
public
isPage() : bool
Tags
Return values
boollastModified()
public
lastModified([mixed $var = null ]) : bool
Parameters
- $var : mixed = null
Tags
Return values
boolmedia()
public
media([mixed $var = null ]) : Media
Parameters
- $var : mixed = null
Tags
Return values
Mediamenu()
public
menu([mixed $var = null ]) : string
Parameters
- $var : mixed = null
Tags
Return values
stringmodified()
public
modified([mixed $var = null ]) : int
Parameters
- $var : mixed = null
Tags
Return values
intorder()
public
order([mixed $var = null ]) : mixed
Parameters
- $var : mixed = null
Tags
process()
public
process([mixed $var = null ]) : array<string|int, mixed>
Parameters
- $var : mixed = null
Tags
Return values
array<string|int, mixed>publishDate()
public
publishDate([mixed $var = null ]) : int|null
Parameters
- $var : mixed = null
Tags
Return values
int|nullpublished()
public
published([mixed $var = null ]) : bool
Parameters
- $var : mixed = null
Tags
Return values
boolrawMarkdown()
public
rawMarkdown([mixed $var = null ]) : string
Parameters
- $var : mixed = null
Tags
Return values
stringsetRawContent()
public
setRawContent(mixed $content) : void
Parameters
- $content : mixed
Tags
setSummary()
public
setSummary(mixed $summary) : void
Parameters
- $summary : mixed
Tags
shouldProcess()
public
shouldProcess(mixed $process) : bool
Parameters
- $process : mixed
Tags
Return values
boolslug()
public
slug([mixed $var = null ]) : mixed
Parameters
- $var : mixed = null
Tags
summary()
public
summary([mixed $size = null ][, mixed $textOnly = false ]) : string
Parameters
- $size : mixed = null
- $textOnly : mixed = false
Tags
Return values
stringtaxonomy()
public
taxonomy([mixed $var = null ]) : array<string|int, mixed>
Parameters
- $var : mixed = null
Tags
Return values
array<string|int, mixed>title()
public
title([mixed $var = null ]) : string
Parameters
- $var : mixed = null
Tags
Return values
stringunpublishDate()
public
unpublishDate([mixed $var = null ]) : int|null
Parameters
- $var : mixed = null
Tags
Return values
int|nullvalue()
public
abstract value(mixed $name[, mixed $default = null ][, mixed $separator = null ]) : mixed
Parameters
- $name : mixed
- $default : mixed = null
- $separator : mixed = null
Tags
visible()
public
visible([mixed $var = null ]) : bool
Parameters
- $var : mixed = null
Tags
Return values
boolloadHeaderProperty()
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
HeaderoffsetPrepare_header()
protected
offsetPrepare_header(Header|stdClass|array<string|int, mixed>|null $value) : Header
Parameters
- $value : Header|stdClass|array<string|int, mixed>|null
Return values
HeaderoffsetSerialize_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
Return values
stringprocessMarkdown()
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
Return values
stringprocessSummary()
protected
processSummary([int|null $size = null ][, bool $textOnly = false ]) : string
Parameters
- $size : int|null = null
- $textOnly : bool = false
Return values
stringprocessTwig()
Process the Twig page content.
protected
processTwig(string $content) : string
Parameters
- $content : string