A type of Inputfield that contains other Inputfield objects as children. Commonly a form or a fieldset.

Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the InputfieldWrapper class also inherits all the methods and properties of: Inputfield, WireData and Wire.

Manipulation / Retrieval and traversal / Output / Input / Module

Show “InputfieldWrapper”             Show Arguments        

Manipulation

NameReturnSummary 
InputfieldWrapper::add($item)
$thisAdd an Inputfield item as a child (also accepts array definition)
InputfieldWrapper::append(Inputfield $item)
$thisAppend an Inputfield to this instance’s children.
InputfieldWrapper::import($items)
$thisImport the given Inputfield items as children
InputfieldWrapper::importArray(array $a)
$thisImport an array of Inputfield definitions to to this InputfieldWrapper instance
InputfieldWrapper::insertAfter(Inputfield $item, Inputfield $existingItem)
$thisInsert one Inputfield after one that’s already there.
InputfieldWrapper::insertBefore(Inputfield $item, Inputfield $existingItem)
$thisInsert one Inputfield before one that’s already there.
InputfieldWrapper::populateValues($data)
arrayPopulate values for all Inputfields in this wrapper from the given $data object or array.
InputfieldWrapper::prepend(Inputfield $item)
$thisPrepend an Inputfield to this instance’s children.
InputfieldWrapper::remove($item)
$thisRemove an Inputfield from this instance’s children.

Retrieval and traversal

NameReturnSummary 
InputfieldWrapper::children()
InputfieldsArrayReturn all children Inputfield objects
Can also be used as property: InputfieldWrapper::children
InputfieldWrapper::count()
intReturn the quantity of children present
InputfieldWrapper::find(string $selector)
InputfieldsArrayFind all children Inputfields matching a selector string
InputfieldWrapper::get(string $key)
Inputfield or mixedGet a child Inputfield having a name attribute matching the given $key.
InputfieldWrapper::getAll()
InputfieldWrapperGet all Inputfields below this recursively in a flat InputfieldWrapper (children, and their children, etc.)
InputfieldWrapper::getChildByName(string $name)
Inputfield or nullGiven an Inputfield name, return the child Inputfield or NULL if not found.
InputfieldWrapper::getErrors()
arrayReturn an array of errors that occurred on any of the children during input processing.
InputfieldWrapper::getIterator()
InputfieldsArrayEnables foreach() of the children of this class
InputfieldWrapper::isEmpty()
boolReturns true if all children are empty, or false if one or more is populated

Output

NameReturnSummary 
InputfieldWrapper::render()
stringRender this Inputfield and the output of its children.
InputfieldWrapper::renderInputfield(Inputfield $inputfield)
stringRender output for an individual Inputfield
InputfieldWrapper::renderValue()
stringRender the output of this Inputfield and its children, showing values only (no inputs)

Input

NameReturnSummary 
InputfieldWrapper::getErrors()
arrayReturn an array of errors that occurred on any of the children during input processing.
InputfieldWrapper::processInput(WireInputData $input)
$thisProcess input for all children

Module

NameReturnSummary 
InputfieldWrapper::getConfigInputfields()
InputfieldWrapperGet configuration Inputfields for this InputfieldWrapper

Additional methods and properties

In addition to the methods and properties above, InputfieldWrapper also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.62