Pages Trash
Implements page trash/restore/empty methods for the $pages API variable.
Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the PagesTrash
class also inherits all the methods and properties of: Wire.
Trash
Name | Return | Summary | |
---|---|---|---|
$pages->trasher->emptyTrash() $pages->trasher->emptyTrash() $pages->trasher->emptyTrash(array $options = []) | int array | Delete all pages in the trash | |
$pages->trasher->trash() $pages->trasher->trash(Page $page) $pages->trasher->trash(Page $page, bool $save = true) | bool | Move a page to the trash |
Restore
Name | Return | Summary | |
---|---|---|---|
$pages->trasher->getRestoreInfo() $pages->trasher->getRestoreInfo(Page $page) $pages->trasher->getRestoreInfo(Page $page, bool $populateToPage = false) | array | Get info needed to restore a Page that is in the trash | |
$pages->trasher->restore() $pages->trasher->restore(Page $page) $pages->trasher->restore(Page $page, bool $save = true) | bool | Restore a page from the trash back to a non-trash state |
Info
Name | Return | Summary | |
---|---|---|---|
$pages->trasher->getTrashPage() $pages->trasher->getTrashPage() $pages->trasher->getTrashPage() | Page | Return the root parent trash page | |
$pages->trasher->getTrashTotal() $pages->trasher->getTrashTotal() $pages->trasher->getTrashTotal() | int | Get total number of pages in trash | |
$pages->trasher->parseTrashPageName() $pages->trasher->parseTrashPageName(string $name) $pages->trasher->parseTrashPageName(string $name) | array bool | Parse a trashed page name into an array of its components |
Additional methods and properties
In addition to the methods and properties above, PagesTrash also inherits the methods and properties of these classes:
API reference based on ProcessWire core version 3.0.252