Import ZIP file to create pages
Usage
// basic usage
$items = $porter->importZIP(string $filename);
// usage with all arguments
$items = $porter->importZIP(string $filename, array $options = []);
Arguments
| Name | Type(s) | Description |
|---|
$filename | string | Path+filename to ZIP file |
$options (optional) | array | commit (bool): Commit/save the changes now? Specify false to perform a test import. Default:trueupdate (bool): Allow update of existing pages? Default:truecreate (bool): Allow creation of new pages? Default:trueparent (Page|string|int): Parent Page, path or ID. Omit to use import data Default:0template (Template|string|int): Template object, name or ID. Omit to use import data Default:0fieldNames (array): Import only these field names, or omit to use all import data Default:[]changeStatus (bool): Allow status to be changed aon existing pages? Default:truechangeSort (bool): Allow sort and sortfield to be changed on existing pages? Default:true- Note: all the "change" prefix options require update=true.
|
Return value
$porter methods and properties
API reference based on ProcessWire core version 3.0.255