public function buildFileInput($name = '', $id = '', $class = '', $required = false, $accept = '', $attributes = [])
    {
        // Create file input
        $id = $id ?: 'ffi' . mt_rand();
        $element = $this->buildInput($type = 'file', $name, $value = '', $id, $class, $autofocus = false, $required, $attributes);

        // Set accept attribute
        $element->attr('accept', $accept);

        // Return form element
        return $element;
    }
public function buildFileInput($name = '', $id = '', $class = '', $required = false, $accept = '', $attributes = [])
    {
        // Create file input
        $id = $id ?: 'ffi' . mt_rand();
        $element = $this->buildInput($type = 'file', $name, $value = '', $id, $class, $autofocus = false, $required, $attributes);

        // Set accept attribute
        $element->attr('accept', $accept);

        // Return form element
        return $element;
    }
public function buildFileInput ( $ name = '' , $ id = '' , $ class = '' , $ required = false , $ accept = '' , $ attributes = [ ] ) { // Create file input $ id = $ id ? : 'ffi' . mt_rand ( ) ; $ element = $ this -> buildInput ( $ type = 'file' , $ name , $ value = '' , $ id , $ class , $ autofocus = false , $ required , $ attributes ) ; // Set accept attribute $ element -> attr ( 'accept' , $ accept ) ; // Return form element return $ element ; }
Build an html form file input.

@param string $name       The input's name.
@param string $id         The input's id attribute.
@param string $class      The extra class for the input.
@param bool   $required   Indicates this input as required.
@param string $accept     The accept attribute for the file dialog.
@param array  $attributes A set of extra attributes

@return FormElement
@throws Exception
Build an html form file input .