AdamWathan\BootForms\BasicFormBuilder::file PHP Méthode

file() public méthode

public file ( $label, $name, $value = null )
    public function file($label, $name, $value = null)
    {
        $control = $this->builder->file($name)->value($value);
        $label = $this->builder->label($label, $name)->addClass('control-label')->forId($name);
        $control->id($name);
        $formGroup = new FormGroup($label, $control);
        if ($this->builder->hasError($name)) {
            $formGroup->helpBlock($this->builder->getError($name));
            $formGroup->addClass('has-error');
        }
        return $this->wrap($formGroup);
    }