PageArray::findOne()

Same as find() method, but returns a single Page rather than PageArray or false if not found.

Returns false when not found (WireArray contract). If you need a Page|NullPage return instead, use findOnePage() which is the Page-typed counterpart to this method.

Usage

$page = $pageArray->findOne(string $selector);

Arguments

NameType(s)Description
$selectorstring

Return value

Page false

First matching Page, or false if not found

See Also


PageArray methods and properties

API reference based on ProcessWire core version 3.0.269