PageTraversal::references()

Return pages that are referencing the given one by way of Page references

Usage

// basic usage
$items = $pageTraversal->references(Page $page);

// usage with all arguments
$items = $pageTraversal->references(Page $page, $selector = '', $field = '', bool $getCount = false);

Arguments

NameType(s)Description
$pagePage
$selector (optional)string bool

Optional selector to filter results by or boolean true as shortcut for include=all.

$field (optional)Field string

Limit to follower pages using this field,

  • or specify boolean TRUE to make it return array of PageArrays indexed by field name.
$getCount (optional)bool

Specify true to return counts rather than PageArray(s)

Return value

PageArray array int

Exceptions

Method can throw exceptions on error:

  • WireException - Highly unlikely


PageTraversal methods and properties

API reference based on ProcessWire core version 3.0.255