PHP code example of softcommerce / yii2-knob

1. Go to this page and download the library: Download softcommerce/yii2-knob library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

softcommerce / yii2-knob example snippets


echo softcommerce\knob\Knob::widget([
        'name' => 'animated_knob_with_icon',
        'value' => 62,
        'icon' => '<span class="glyphicon glyphicon-flash"></span>',
        'options' => [
            'data-min' => '0',
            'data-max' => '100',
            'data-width' => '100',
            'data-height' => '100',
        ],
        'knobOptions' => [
            'readOnly' => true,
            'thickness' => '.25',
            'dynamicDraw' => true,
            'fgColor' => '#9fc569',
        ],
    ]
);