Add one or more Page objects to this PageArray.
Please see the WireArray::add()
method for more details.
Example
// Add one page
$pageArray->add($page);
// Add multiple pages
$pageArray->add($pages->find("template=basic-page"));
// Add page by ID
$pageArray->add(1005);
Usage
$pageArray->add($item);
Arguments
Name | Type(s) | Description |
---|---|---|
item | Page, PageArray, int | Page object, PageArray object, or Page ID.
|
Return value
$this
Object instance it was called from (method supports fluent interface).
Exceptions
Method can throw exceptions on error:
WireException
- If given an item that can't be stored by this WireArray.
See Also
PageArray methods and properties
API reference based on ProcessWire core version 3.0.236