PagesExportImport::getImportInfo() method

Return array of info about the import data

This also populates the given import data ($a) with an '_info' property, which is an array containing all of the import info returned by this method. For each item in the 'pages' index it also populates an '_importToID' property containing the ID of the existing local page to update, or 0 if it should be a newly created page.

Return value:

Example

array(
  'numNew' => 0,
  'numExisting' => 0,
  'missingParents' => [ '/path/to/parent/' ],
  'missingTemplates' => [ 'basic-page-hello' ],
  'missingFields' => [ 'some_field', 'another_field' ],
  'missingFieldsTypes' => [ 'some_field' => 'FieldtypeText', 'another_field' => 'FieldtypeTextarea' ]
  'mismatchedFields' => [ 'some_field' => 'FieldtypeText' ] // field name => expected type
  'missingTemplateFields' => [ 'template_name' => [ 'field1', 'field2', etc ] ]
);

Usage

$array = $pagesExportImport->getImportInfo(array $a);

Arguments

NameType(s)Description
aarray

Import data array

Return value

array


PagesExportImport methods and properties

API reference based on ProcessWire core version 3.0.236

Latest news

  • ProcessWire Weekly #518
    The 518th issue of ProcessWire Weekly brings in all the latest news from the ProcessWire community. Modules, sites, and more. Read on!
    Weekly.pw / 13 April 2024
  • ProFields Table Field with Actions support
    This week we have some updates for the ProFields table field (FieldtypeTable). These updates are primarily focused on adding new tools for the editor to facilitate input and management of content in a table field.
    Blog / 12 April 2024
  • Subscribe to weekly ProcessWire news

“ProcessWire is like a breath of fresh air. So powerful yet simple to build with and customise, and web editors love it too.” —Margaret Chatwin, Web developer