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.137

Twitter updates

  • ProcessWire 3.0.144 and 3.0.145 add improved field template context override settings and include a new Inputfields API, along with numerous other issue fixes, optimizations and improvements to the core. More
    8 November 2019
  • ProcessWire 3.0.144 core updates: Upgraded overrides section in the field editor, a new Inputfields JS API, and more— More
    1 November 2019
  • ProcessWire 3.0.143 core updates — 26 commits and 18 resolved issue reports, plus some other useful improvements and additions. More here: More
    25 October 2019

Latest news

  • ProcessWire Weekly #288
    In the 288th issue of ProcessWire Weekly we'll cover the latest core updates, introduce WireMailSendGrid, host a new weekly poll, and showcase a new site of the week. Read on!
    Weekly.pw / 16 November 2019
  • ProcessWire 3.0.145 core updates
    ProcessWire 3.0.144 and 3.0.145 add improved field template context override settings and include a new Inputfields API, along with numerous other issue fixes, optimizations and improvements to the core.
    Blog / 8 November 2019
  • Subscribe to weekly ProcessWire news

“The end client and designer love the ease at which they can update the website. Training beyond how to log in wasn’t even necessary since ProcessWire’s default interface is straightforward.” —Jonathan Lahijani