InputfieldWrapper::import() method

Import the given Inputfield items as children

If given an InputfieldWrapper, it will import the children of it and exclude the wrapper itself. This is different from InputfieldWrapper::add() in that add() would add the wrapper, not just the children. See also the InputfieldWrapper::importArray() method.

Usage

$inputfieldWrapper->import($items);

Arguments

NameType(s)Description
itemsInputfieldWrapper, array, InputfieldsArray

Wrapper containing items to add

Return value

$this

Object instance it was called from (method supports fluent interface).

Exceptions

Method can throw exceptions on error:

  • WireException

See Also


InputfieldWrapper methods and properties

API reference based on ProcessWire core version 3.0.236

Latest news

  • ProcessWire Weekly #533
    In the 533rd issue of ProcessWire Weekly we'll check out some newly released third party modules and highlight a new site of the week. Read on!
    Weekly.pw / 27 July 2024
  • Page List Custom Children module
    This simple module gives you the ability to customize the parent/child relationship as it appears in the admin page list, enabling child pages to appear under more than one parent.
    Blog / 28 June 2024
  • Subscribe to weekly ProcessWire news

“I am currently managing a ProcessWire site with 2 million+ pages. It’s admirably fast, and much, much faster than any other CMS we tested.” —Nickie, Web developer