PagesTrash::trasher method
Move a page to the trash
If you have already set the parent to somewhere in the trash, then this method won't attempt to set it again.
Usage
// basic usage
$bool = $pages->trasher->trash(Page $page);
// usage with all arguments
$bool = $pages->trasher->trash(Page $page, bool $save = true);
Arguments
Name | Type(s) | Description |
---|---|---|
$page | Page | |
$save (optional) | bool | Set to false if you will perform the save() call, as is the case when called from the Pages::save() method. |
Return value
bool
Exceptions
Method can throw exceptions on error:
WireException
$pages->trasher methods and properties
API reference based on ProcessWire core version 3.0.252