Add file element

@param $name
@param string $label
@param array $attr
@return \FrenchFrogs\Form\Element\File
778139
public function addFile($name, $label = '', $is_mandatory = true)
    {
        $e = new \FrenchFrogs\Form\Element\File($name, $label);
        $this->addElement($e);

        if ($is_mandatory) {
            $e->addRule('required');
        } else {
            $e->addFilter('nullable');
        }

        return $e;
    }
999127
public function staticValue($key, $label=false, array $attr=[]){
		$field = $this->factory('static', $key, $label, $attr);
		return $this->addField($field);
	}
1206787
public function addLink($name, $label = '', $link = '#', $binds = [], $attr = [] )
    {
        $c = new Column\Link($name, $label, $link, $binds, $attr);
        $this->addColumn($c);

        return $c;
    }
378914
protected function addElement_textarea ($name, $label, $customElementConfig=array())
    {
        $defaultElementConfig = array(
            'name'       => $name,
            'attributes' => array(
                'id'         => $name,
            ),
            'options'    => array(
                'label'      => $label,
            ),
        );
        $elementConfig = array_replace_recursive(
            $defaultElementConfig,
            $customElementConfig
        );

        $this->addElement_textarea_configArray($elementConfig);
    }
407060
public function addText($name, $label = '', $is_mandatory = true)
    {
        $e = new \FrenchFrogs\Form\Element\Text($name, $label);
        $this->addElement($e);

        if ($is_mandatory) {
            $e->addRule('required');
        } else {
            $e->addFilter('nullable');
        }

        return $e;
    }
128608
public function label($name, $label, array $attr = null)
    {
        return $this->input($name, [ 'type' => 'label', 'label' => $label, 'attr' => $attr ]);
    }
178013
public function addLabelDate($name, $label = '')
    {
        $e = new \FrenchFrogs\Form\Element\LabelDate($name, $label);
        $this->addElement($e);

        return $e;
    }
269630
public function addImage($name, $label = '', $width = null, $height = null )
    {
        $e = new \FrenchFrogs\Form\Element\Image($name, $label, $width, $height);
        $this->addElement($e);
        return $e;
    }
1277188
public function addDatetime($name, $label = '', $format = null, $attr = [])
    {
        $c = new Column\Datetime($name, $label, $format, $attr);
        $this->addColumn($c);
        return $c;
    }
520884
public function addFile($name, $mode = 'c+')
    {
        $path = $this->details->getRealPath();
        return new File($path .'/'. ltrim($name, '/'), $mode);
    }
993181
protected function addElement_date ($name, $label, $customElementConfig=array())
    {
        $defaultElementConfig = array(
            'name'       => $name,
            'attributes' => array(
                'id'         => $name,
            ),
            'options'    => array(
                'label'      => $label,
            ),
        );
        $elementConfig = array_replace_recursive(
            $defaultElementConfig,
            $customElementConfig
        );

        $this->addElement_text_configArray($elementConfig);
    }
881978
public function textarea($name, $label, $attr = array())
    {
        return $this->input(
            $name,
            $label,
            array_merge(
                $attr,
                array('type' => 'textarea')
            )
        );
    }
1343382
public function add($name, $label = null, $orderby = false)
    {
        $column = new Column($name, $label, $orderby);
        $this->columns[$column->name] = $column;
        if (!in_array($name,array("_edit"))) {
            $this->headers[] = $label;
        }
        if ($orderby) {
            $this->addOrderBy($column->orderby_field);
        }
        return $column;
    }
345746
public function file($name, $label = null, array $options = [])
    {
        $label = $this->getLabelTitle($label, $name);

        $options = array_merge(['class' => 'filestyle', 'data-buttonBefore' => 'true'], $options);

        $options = $this->getFieldOptions($options, $name);
        $inputElement = $this->form->input('file', $name, null, $options);

        $wrapperOptions = $this->isHorizontal() ? ['class' => $this->getRightColumnClass()] : [];
        $wrapperElement = '<div' . $this->html->attributes($wrapperOptions) . '>' . $inputElement . $this->getFieldError($name) . $this->getHelpText($name, $options) . '</div>';

        return $this->getFormGroup($name, $label, $wrapperElement);
    }
1336046
public function addInputFile(string $name) : Element\Input\File
    {
        $this->setEnctypeMultipart();

        $input = new Element\Input\File($this, $name);
        $this->addComponent($name, $input);

        return $input;
    }
710103
protected function addAttr($label, $value, &$attr)
    {
        if (!isset($attr[$label])) {
            $attr[$label] = '';
        } else {
            $attr[$label] .= ' ';
        }
        $attr[$label] .= $value;

        return $this;
    }
66753
public function addBoolean($name, $label = '', $attr = [])
    {

        $c = new Column\Boolean($name, $label, $attr);
        $this->addColumn($c);

        return $c;
    }