PHP code example of cinghie / yii2-iconpicker

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

    

cinghie / yii2-iconpicker example snippets


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


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