PHP code example of insolita / yii2-iconpicker

1. Go to this page and download the library: Download insolita/yii2-iconpicker 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/ */

    

insolita / yii2-iconpicker example snippets


<?= $form->field($model, 'icon')->widget('\insolita\iconpicker\Iconpicker',
 [
   'iconset'=>'fontawesome',
   'clientOptions'=>['rows'=>8,'cols'=>10,'placement'=>'right'],
 ])->label('Choose icon'); 

 
    echo \insolita\iconpicker\Iconpicker::widget([
        'id'=>'choose_icon',
        'name'=>'myicon',
        'value'=>'glyphicon-cog',
        'iconset'=>'glyphicon',
        'pickerOptions'=>['class'=>'btn btn-primary'],
        'clientOptions'=>['placement'=>'bottom','search'=>false],
    ]);