2017 © Pedro Peláez
 

yii2-extension yii2-slider

HTML widget extension for Yii2 based on bootstrap-slider

image

muvo/yii2-slider

HTML widget extension for Yii2 based on bootstrap-slider

  • Monday, October 24, 2016
  • by muvo
  • Repository
  • 1 Watchers
  • 0 Stars
  • 176 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 6 % Grown

The README.md

Bootstrap Slider

An extension for Yii2

Installing

~$ composer require muvo/yii2-slider "*"

or add following string in your composer.json into require section:, (*1)

    "muvo/yii2-slider": "*"

then do

~$ composer update

Usage

After successful install you can use a slider as general widget in your view-files, for example:, (*2)

    <div>
        <?=\muvo\yii\slider\Widget::widget([
            'name' => 'call_intensity',
            'value' => $predefined_value,
            'sliderOptions' => [
                'min' => 0.5,
                'max' => 8,
                'step' => 0.5,
            ],
        ])?>
    </div>

If you don't want to use a native boottrap assets (for example, you theme/layout already has pre-defined bootstrap), you can add useNativeBootstrap option to your widget:, (*3)

<div class="col-sm-8">
    <?=\muvo\yii\slider\Widget::widget([
        'useNativeBootstrap' => false,
            'name' => 'call_intensity',
            'value' => $predefined_value,
        …
    ])?>
</div>

Options for widget

Available options, to be passed for config widget: * id ID for widget, will be passed to HTML-tag of widget * name HTML «name» attribute for HTML-input tag * value Predefined value for HTML-input * sliderOptions Array with config options, supported by slider-bootstrap, (*4)

Credits

Vladislav Muschinskikh i@unixoid.su © 2016, (*5)

The Versions

24/10 2016

dev-master

9999999-dev

HTML widget extension for Yii2 based on bootstrap-slider

  Sources   Download

The Requires

 

by Vladislav Muschinskikh

yii2 bootstrap html widget slider