PagesTrash::trasher method
Restore a page from the trash back to a non-trash state
Note that this method assumes already have set a new parent, but have not yet saved. If you do not set a new parent, then it will restore to the original parent, when possible.
Usage
// basic usage
$bool = $pages->trasher->restore(Page $page);
// usage with all arguments
$bool = $pages->trasher->restore(Page $page, bool $save = true);
Arguments
Name | Type(s) | Description |
---|---|---|
$page | Page | |
$save (optional) | bool | Set to false if you only want to prep the page for restore (i.e. being saved elsewhere) |
Return value
bool
$pages->trasher methods and properties
API reference based on ProcessWire core version 3.0.252