PagesVersions::savePageVersion() method
Save a page version
Usage
// basic usage
$int = $pagesVersions->savePageVersion(Page $page);
// usage with all arguments
$int = $pagesVersions->savePageVersion(Page $page, $version = 0, array $options = []);Arguments
| Name | Type(s) | Description |
|---|---|---|
$page | Page | |
$version (optional) | int PageVersionInfo | Version number or PageVersionInfo
|
$options (optional) | array |
|
Return value
int arrayReturns version number saved or added or 0 on fail
Exceptions
Method can throw exceptions on error:
WireExceptionor\PDOException
$pagesVersions methods and properties
API reference based on ProcessWire core version 3.0.253