Fieldgroup is a type of WireArray that holds a group of Field objects for template(s).
For full details on all methods available in a Fieldgroup, be sure to also see the WireArray
class.
Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the Fieldgroup
class also inherits all the methods and properties of: WireArray and Wire.
Common
Name | Return | Summary | |
---|---|---|---|
Fieldgroup::fields_id | array | Array of all field IDs in this Fieldgroup | |
Fieldgroup::removedFields | null FieldsArray | Null when there are no removed fields, or FieldsArray when there are. |
Retrieval
Manipulation
Name | Return | Summary | |
---|---|---|---|
Fieldgroup::add() Fieldgroup::add($item) Fieldgroup::add($item) | $this | Add a field to this Fieldgroup | |
Fieldgroup::remove() Fieldgroup::remove($key) Fieldgroup::remove($key) | bool | Remove a field from this fieldgroup | |
Fieldgroup::save() Fieldgroup::save() Fieldgroup::save() | $this | Save this Fieldgroup to the database | |
Fieldgroup::saveContext() Fieldgroup::saveContext() Fieldgroup::saveContext() | int | Save field contexts for this fieldgroup | |
Fieldgroup::set() Fieldgroup::set(string $key, $value) Fieldgroup::set(string $key, $value) | Fieldgroup WireArray | Set a fieldgroup property | |
Fieldgroup::softRemove() Fieldgroup::softRemove($field) Fieldgroup::softRemove($field) | bool Fieldgroup WireArray | Remove a field without queueing it to be removed from database |
Additional methods and properties
In addition to the methods and properties above, Fieldgroup also inherits the methods and properties of these classes:
API reference based on ProcessWire core version 3.0.236