$fieldgroupsnewFieldgroup()

Create a new Fieldgroup in memory

Available since version 3.0.258.

Usage

// basic usage
$fieldgroup = $fieldgroups->newFieldgroup(string $name);

// usage with all arguments
$fieldgroup = $fieldgroups->newFieldgroup(string $name, array $addFields = []);

Arguments

NameType(s)Description
$namestring

Fieldgroup name

$addFields (optional)array

Array of field instances, names or ids to add to fieldgroup 3.0.263+

Return value

Exceptions

Method can throw exceptions on error:

  • WireException - If given a name that already exists


$fieldgroups methods and properties

API reference based on ProcessWire core version 3.0.267