Documentation

PageLegacyTrait

Implements PageLegacyInterface.

Table of Contents

Methods

adjacentSibling()  : PageInterface|false
Returns the adjacent sibling based on a direction.
ancestor()  : PageInterface|null
Helper method to return an ancestor page.
children()  : FlexIndexInterface|PageCollectionInterface|Collection
Returns children of this page.
collection()  : PageCollectionInterface|Collection
Get a collection of pages in the current context.
evaluate()  : PageCollectionInterface|Collection
find()  : PageInterface|null
Helper method to return a page.
isFirst()  : bool
Check to see if this item is the first in an array of sub-pages.
isLast()  : bool
Check to see if this item is the last in an array of sub-pages.
getInheritedParams()  : array<string|int, mixed>
Method that contains shared logic for inherited() and inheritedField()

Methods

adjacentSibling()

Returns the adjacent sibling based on a direction.

public adjacentSibling([int $direction = 1 ]) : PageInterface|false
Parameters
$direction : int = 1

either -1 or +1

Return values
PageInterface|false

the sibling page

ancestor()

Helper method to return an ancestor page.

public ancestor([string|null $lookup = null ]) : PageInterface|null
Parameters
$lookup : string|null = null

Name of the parent folder

Return values
PageInterface|null

page you were looking for if it exists

find()

Helper method to return a page.

public find(string $url[, bool $all = false ]) : PageInterface|null
Parameters
$url : string

the url of the page

$all : bool = false
Return values
PageInterface|null

page you were looking for if it exists

isFirst()

Check to see if this item is the first in an array of sub-pages.

public isFirst() : bool
Return values
bool

True if item is first.

isLast()

Check to see if this item is the last in an array of sub-pages.

public isLast() : bool
Return values
bool

True if item is last

getInheritedParams()

Method that contains shared logic for inherited() and inheritedField()

protected getInheritedParams(string $field) : array<string|int, mixed>
Parameters
$field : string

Name of the parent folder

Return values
array<string|int, mixed>

        
On this page

Search results