class ControlGroup

Named group of form controls, typically rendered as a fieldset.

Properties

protected Control,null> $controls

Methods

__construct()

No description

add(Container|iterable ...$items)

No description

void
remove(Control $control)

No description

void
removeOrphans()

Removes controls that are no longer attached to a form.

array
getControls()

Returns all controls in this group.

setOption(string $key, mixed $value)

Sets a rendering option. Options recognized by DefaultFormRenderer:

  • 'label' - group label (string or HtmlStringable)
  • 'visual' - whether the group is rendered as a visual fieldset
  • 'container' - custom container Html element
  • 'description' - group description (string or HtmlStringable)
  • 'embedNext' - whether to embed the next group inside this group's container

mixed
getOption(string $key)

Returns a rendering option value.

array
getOptions()

Returns all rendering options.

Details

at line 26
__construct()

No description

at line 33
ControlGroup add(Container|iterable ...$items)

No description

Parameters

Container|iterable ...$items

Return Value

ControlGroup

at line 54
void remove(Control $control)

No description

Parameters

Control $control

Return Value

void

at line 63
void removeOrphans()

Removes controls that are no longer attached to a form.

Return Value

void

at line 77
array getControls()

Returns all controls in this group.

Return Value

array

at line 95
ControlGroup setOption(string $key, mixed $value)

Sets a rendering option. Options recognized by DefaultFormRenderer:

  • 'label' - group label (string or HtmlStringable)
  • 'visual' - whether the group is rendered as a visual fieldset
  • 'container' - custom container Html element
  • 'description' - group description (string or HtmlStringable)
  • 'embedNext' - whether to embed the next group inside this group's container

Parameters

string $key
mixed $value

Return Value

ControlGroup

at line 111
mixed getOption(string $key)

Returns a rendering option value.

Parameters

string $key

Return Value

mixed

at line 121
array getOptions()

Returns all rendering options.

Return Value

array