Class kartik\file\FileInput

Inheritancekartik\file\FileInput » kartik\base\InputWidget
Uses Traitskartik\base\TranslationTrait
Available since version2.0

FileInput widget styled for Bootstrap 3.0 with ability to multiple file selection and preview, format button styles and inputs. Runs on all modern browsers supporting HTML5 File Inputs and File Processing API. For browser versions IE9 and below, this widget will gracefully degrade to normal HTML file input.

Wrapper for the Bootstrap FileInput JQuery Plugin by Krajee

See also:

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$i18n array The internalization configuration for this widget kartik\file\FileInput
$messageOptions kartik\file\FileInput
$showMessage boolean Whether to show 'plugin unsupported' message for IE browser versions 9 & below kartik\file\FileInput

Public Methods

Hide inherited methods

MethodDescriptionDefined By
init() kartik\file\FileInput
registerAssetBundle() Registers the asset bundle and locale kartik\file\FileInput
registerAssets() Registers the needed assets kartik\file\FileInput

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
validateIE() Validates and returns content based on IE browser version validation kartik\file\FileInput

Property Details

$i18n public property

The internalization configuration for this widget

public array $i18n = []
$messageOptions public property
public $messageOptions = ['class' => 'alert alert-warning']
$showMessage public property

Whether to show 'plugin unsupported' message for IE browser versions 9 & below

public boolean $showMessage true

Method Details

init() public method

public void init ( )
registerAssetBundle() public method

Registers the asset bundle and locale

public void registerAssetBundle ( )
registerAssets() public method

Registers the needed assets

public void registerAssets ( )
validateIE() protected method

Validates and returns content based on IE browser version validation

protected string validateIE ( $content, $validation 'lt IE 10' )
$content string
$validation string