PagesExportImport::arrayToPages() method

Import an array of page data to create or update pages

Provided array ($a) must originate from the pagesToArray() method format.

Usage

// basic usage
$items = $porter->arrayToPages(array $a);

// usage with all arguments
$items = $porter->arrayToPages(array $a, array $options = []);

Arguments

NameType(s)Description
$aarray

Array of import data

$options (optional)array
  • count (bool): Return count of imported pages, rather than PageArray? Reduces memory requirements. Default:false
  • pageArray (PageArray): PageArray object to populate, or omit to return new PageArray Default:null

Return value

Exceptions

Method can throw exceptions on error:

  • WireException


$porter methods and properties

API reference based on ProcessWire core version 3.0.252