You are here

protected function HostingForm::moveFieldsIntoFieldset in Aegir Objects 7.3

File

classes/HostingForm.inc, line 132
The HostingForm class.

Class

HostingForm
@file The HostingForm class.

Code

protected function moveFieldsIntoFieldset($fieldset, $fields) {
  if (!isset($this->form[$fieldset])) {
    $this->form[$fieldset] = [
      '#type' => 'fieldset',
    ];
  }
  foreach ($fields as $field) {
    $this->form[$fieldset][$field] = $this->form[$field];
    unset($this->form[$field]);
  }
}