src/FormLayout/Generic.php
public function addGroup($label = null)
    {
        if (!is_array($label)) {
            $label = ['label' => $label];
        } elseif (isset($label[0])) {
            $label['label'] = $label[0];
            unset($label[0]);
        }

        $label['form'] = $this->form;

        return $this->add(new static($label));
    }
public function addGroup($label = null)
    {
        if (!is_array($label)) {
            $label = ['label' => $label];
        } elseif (isset($label[0])) {
            $label['label'] = $label[0];
            unset($label[0]);
        }

        $label['form'] = $this->form;

        return $this->add(new static($label));
    }
public function addGroup ( $ label = null ) { if ( ! is_array ( $ label ) ) { $ label = [ 'label' => $ label ] ; } elseif ( isset ( $ label [ 0 ] ) ) { $ label [ 'label' ] = $ label [ 0 ] ; unset ( $ label [ 0 ] ) ; } $ label [ 'form' ] = $ this -> form ; return $ this -> add ( new static ( $ label ) ) ; }
Adds field group in form layout.

@param string|array $label

@return static
Adds field group in form layout .