class PageList extends AttributedItemList implements PagerProviderInterface, PaginationProviderInterface (View source)

An object that allows a filtered list of pages to be returned.

Constants

PAGE_VERSION_ACTIVE

PAGE_VERSION_RECENT

PAGE_VERSION_RECENT_UNAPPROVED

SITE_TREE_CURRENT

SITE_TREE_ALL

Properties

protected $sortColumnParameter from ItemList
protected $sortDirectionParameter from ItemList
protected $paginationPageParameter from ItemList
protected $sortBy from ItemList
protected $sortByDirection from ItemList
protected $sortBySearchColumn from ItemList
protected $enableAutomaticSorting from ItemList
protected array $autoSortColumns Columns in this array can be sorted via the request.
protected $itemsPerPage from ItemList
protected $debug from ItemList
protected Pagination $pagination from ItemList
protected QueryBuilder $query from ItemList
protected StickyRequest $searchRequest from ItemList
protected Closure $permissionsChecker
protected Tree $siteTree
protected int $pageVersionToRetrieve Which version to attempt to retrieve.
protected $isFulltextSearch Whether this is a search using fulltext.
protected bool $includeSystemPages Whether to include system pages in this query. NOTE: There really isn't a reason to set this to true unless you're doing something pretty custom or deep in the core
protected $includeAliases Whether to include aliases in the result set.
protected bool $includeInactivePages Whether to include inactive (deleted) pages in the query.

Methods

executeSortBy($column, $direction = 'asc')

No description

from ItemList
executeSanitizedSortBy($column, $direction = 'asc')

No description

from ItemList
executeGetResults()

No description

from ItemList
getResult($queryRow)

No description

debugStart()

No description

from ItemList
debugStop()

No description

from ItemList
debug()

No description

from ItemList
isDebugged()

No description

from ItemList
sortBy($field, $direction = 'asc')

No description

from ItemList
sortBySearchColumn(Column $column, $direction = null)

No description

from ItemList
getSearchByColumn()

No description

from ItemList
sanitizedSortBy($field, $direction = 'asc')

No description

from ItemList
getResults()

Returns a full array of results.

from ItemList
getActiveSortColumn()

No description

from ItemList
isActiveSortColumn($field)

No description

from ItemList
disableAutomaticSorting()

No description

from ItemList
getSortClassName($column)

No description

from ItemList
getSortURL($column, $dir = 'asc', $url = false)

No description

from ItemList
getActiveSortDirection()

No description

from ItemList
getQuerySortColumnParameter()

No description

from ItemList
from ItemList
from ItemList
setItemsPerPage($itemsPerPage)

No description

from ItemList
int
getItemsPerPage()

No description

from ItemList
int
getTotalResults()

Returns the total results in this item list.

getPagination() deprecated

Deprecated – call the pagination factory directly.

from ItemList
setupAutomaticSorting(StickyRequest $request = null)

No description

get() deprecated

No description

from ItemList
setNameSpace(mixed $nameSpace)

Allow to modify the auto-pagination parameters and the auto-sorting parameters

from ItemList
createQuery()

No description

QueryBuilder
finalizeQuery(QueryBuilder $query)

No description

__construct(StickyRequest $req = null)

No description

getSearchRequest()

No description

from ItemList
getQueryObject()

No description

from ItemList
deliverQueryObject()

No description

from ItemList
filter($field, $value, $comparison = '=') deprecated

No description

from ItemList
ensureSelected($field)

No description

from ItemList
__clone()

No description

from ItemList
getAttributeKeyClassName()

No description

filterByAttribute($handle, $value, $comparison = '=')

Filters by a attribute.

__call($nm, $a)

Magic method for setting up additional filtering by attributes.

getPermissionsChecker()

No description

setSiteTreeObject(TreeInterface $tree)

No description

setSiteTreeToAll()

No description

setSiteTreeToCurrent()

No description

includeSystemPages()

No description

setPermissionsChecker(Closure $checker = null)

No description

ignorePermissions()

No description

enablePermissions()

No description

includeAliases()

No description

includeInactivePages()

No description

isFulltextSearch()

No description

setPageVersionToRetrieve($pageVersionToRetrieve)

No description

filterBySite(Site $site)

No description

mixed
getPaginationAdapter()

Returns the standard pagination adapter. This is used for non-permissioned objects and is typically something like DoctrineDbalAdapter

checkPermissions($mixed)

No description

filterByPageTypeHandle(mixed $ptHandle)

Filters by type of collection (using the handle field).

filterByPageTemplate(Template $template)

Filters by page template.

filterByDateAdded($date, $comparison = '=')

Filters by date added.

filterByNumberOfChildren($number, string $comparison = '>')

Filter by number of children.

filterByDateLastModified($date, string $comparison = '=')

Filter by last modified date.

filterByPublicDate($date, $comparison = '=')

Filters by public date.

filterByPackage(Package $package)

Filters by package.

filterByPagesWithCustomStyles()

Displays only those pages that have style customizations.

filterByUserID(mixed $uID)

Filters by user ID).

filterByPageTypeID(array $ptID)

Filters by page type ID.

filterByParentID(array $cParentID)

Filters by parent ID.

filterByName($name, bool $exact = false)

Filters a list by page name.

filterByPath($path, bool $includeAllChildren = true)

Filter a list by page path.

filterByKeywords($keywords)

Filters keyword fields by keywords (including name, description, content, and attributes.

filterByFulltextKeywords($keywords)

No description

filterByTopic($topic)

Filters by topic. Doesn't look at specific attributes –instead, actually joins to the topics table.

filterByBlockType(BlockType $bt)

No description

sortByDisplayOrder()

Sorts this list by display order.

sortByDisplayOrderDescending()

Sorts this list by display order descending.

sortByDateModified()

Sorts this list by date modified ascending.

sortByDateModifiedDescending()

Sorts this list by date modified descending.

sortByCollectionIDAscending()

Sorts by ID in ascending order.

sortByPublicDate()

Sorts this list by public date ascending order.

sortByName()

Sorts by name in ascending order.

sortByNameDescending()

Sorts by name in descending order.

sortByPublicDateDescending()

Sorts this list by public date descending order.

sortByRelevance()

Sorts by fulltext relevance (requires that the query be fulltext-based.

selectDistinct()

No description

filterByCollectionTypeHandle($ctHandle) deprecated

No description

filterByCollectionTypeID($ctID) deprecated

No description

ignoreAliases() deprecated

This does nothing.

displayUnapprovedPages() deprecated

No description

Details

protected executeSortBy($column, $direction = 'asc')

Parameters

$column
$direction

protected executeSanitizedSortBy($column, $direction = 'asc')

Parameters

$column
$direction

executeGetResults()

getResult($queryRow)

Parameters

$queryRow

debugStart()

debugStop()

debug()

isDebugged()

sortBy($field, $direction = 'asc')

Parameters

$field
$direction

sortBySearchColumn(Column $column, $direction = null)

Parameters

Column $column
$direction

getSearchByColumn()

sanitizedSortBy($field, $direction = 'asc')

Parameters

$field
$direction

getResults()

Returns a full array of results.

getActiveSortColumn()

isActiveSortColumn($field)

Parameters

$field

disableAutomaticSorting()

getSortClassName($column)

Parameters

$column

getSortURL($column, $dir = 'asc', $url = false)

Parameters

$column
$dir
$url

getActiveSortDirection()

getQuerySortColumnParameter()

getQueryPaginationPageParameter()

getQuerySortDirectionParameter()

setItemsPerPage($itemsPerPage)

Parameters

$itemsPerPage

int getItemsPerPage()

Return Value

int

int getTotalResults()

Returns the total results in this item list.

Return Value

int

Pagination getPagination() deprecated

deprecated

Deprecated – call the pagination factory directly.

Return Value

Pagination

setupAutomaticSorting(StickyRequest $request = null)

Parameters

StickyRequest $request

get() deprecated

deprecated

setNameSpace(mixed $nameSpace)

Allow to modify the auto-pagination parameters and the auto-sorting parameters

Parameters

mixed $nameSpace Content that will be added to the parameters

createQuery()

QueryBuilder finalizeQuery(QueryBuilder $query)

Parameters

QueryBuilder $query

Return Value

QueryBuilder

__construct(StickyRequest $req = null)

Parameters

StickyRequest $req

StickyRequest|null getSearchRequest()

Return Value

StickyRequest|null

getQueryObject()

deliverQueryObject()

filter($field, $value, $comparison = '=') deprecated

deprecated

Parameters

$field
$value
$comparison

protected ensureSelected($field)

Parameters

$field

__clone()

protected getAttributeKeyClassName()

filterByAttribute($handle, $value, $comparison = '=')

Filters by a attribute.

Parameters

$handle
$value
$comparison

__call($nm, $a)

Magic method for setting up additional filtering by attributes.

Parameters

$nm
$a

Exceptions

Exception

PagerManagerInterface getPagerManager()

Return Value

PagerManagerInterface

getPermissionsChecker()

VariableFactory getPagerVariableFactory()

Return Value

VariableFactory

setSiteTreeObject(TreeInterface $tree)

Parameters

TreeInterface $tree

setSiteTreeToAll()

setSiteTreeToCurrent()

includeSystemPages()

setPermissionsChecker(Closure $checker = null)

Parameters

Closure $checker

ignorePermissions()

enablePermissions()

includeAliases()

includeInactivePages()

isFulltextSearch()

setPageVersionToRetrieve($pageVersionToRetrieve)

Parameters

$pageVersionToRetrieve

filterBySite(Site $site)

Parameters

Site $site

mixed getPaginationAdapter()

Returns the standard pagination adapter. This is used for non-permissioned objects and is typically something like DoctrineDbalAdapter

Return Value

mixed

checkPermissions($mixed)

Parameters

$mixed

filterByPageTypeHandle(mixed $ptHandle)

Filters by type of collection (using the handle field).

Parameters

mixed $ptHandle

filterByPageTemplate(Template $template)

Filters by page template.

Parameters

Template $template

filterByDateAdded($date, $comparison = '=')

Filters by date added.

Parameters

$date
$comparison

filterByNumberOfChildren($number, string $comparison = '>')

Filter by number of children.

Parameters

$number
string $comparison

filterByDateLastModified($date, string $comparison = '=')

Filter by last modified date.

Parameters

$date
string $comparison

filterByPublicDate($date, $comparison = '=')

Filters by public date.

Parameters

$date
$comparison

filterByPackage(Package $package)

Filters by package.

Parameters

Package $package

filterByPagesWithCustomStyles()

Displays only those pages that have style customizations.

filterByUserID(mixed $uID)

Filters by user ID).

Parameters

mixed $uID

filterByPageTypeID(array $ptID)

Filters by page type ID.

Parameters

array $ptID | integer $cParentID

filterByParentID(array $cParentID)

Filters by parent ID.

Parameters

array $cParentID | integer $cParentID

filterByName($name, bool $exact = false)

Filters a list by page name.

Parameters

$name
bool $exact

filterByPath($path, bool $includeAllChildren = true)

Filter a list by page path.

Parameters

$path
bool $includeAllChildren

filterByKeywords($keywords)

Filters keyword fields by keywords (including name, description, content, and attributes.

Parameters

$keywords

filterByFulltextKeywords($keywords)

Parameters

$keywords

filterByTopic($topic)

Filters by topic. Doesn't look at specific attributes –instead, actually joins to the topics table.

Parameters

$topic

filterByBlockType(BlockType $bt)

Parameters

BlockType $bt

sortByDisplayOrder()

Sorts this list by display order.

sortByDisplayOrderDescending()

Sorts this list by display order descending.

sortByDateModified()

Sorts this list by date modified ascending.

sortByDateModifiedDescending()

Sorts this list by date modified descending.

sortByCollectionIDAscending()

Sorts by ID in ascending order.

sortByPublicDate()

Sorts this list by public date ascending order.

sortByName()

Sorts by name in ascending order.

sortByNameDescending()

Sorts by name in descending order.

sortByPublicDateDescending()

Sorts this list by public date descending order.

sortByRelevance()

Sorts by fulltext relevance (requires that the query be fulltext-based.

protected selectDistinct()

filterByCollectionTypeHandle($ctHandle) deprecated

deprecated

Parameters

$ctHandle

filterByCollectionTypeID($ctID) deprecated

deprecated

Parameters

$ctID

ignoreAliases() deprecated

deprecated

This does nothing.

displayUnapprovedPages() deprecated

deprecated