AdamWathan\BootForms\HorizontalFormBuilder::formGroup PHP Méthode

formGroup() protected méthode

protected formGroup ( $label, $name, $control )
    protected function formGroup($label, $name, $control)
    {
        $label = $this->builder->label($label, $name)->addClass($this->getLabelClass())->addClass('control-label')->forId($name);
        $control->id($name)->addClass('form-control');
        $formGroup = new HorizontalFormGroup($label, $control, $this->getControlSizes());
        if ($this->builder->hasError($name)) {
            $formGroup->helpBlock($this->builder->getError($name));
            $formGroup->addClass('has-error');
        }
        return $this->wrap($formGroup);
    }