PHP code example of eddycjy / yii2-iconpicker

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

    

eddycjy / yii2-iconpicker example snippets

 php
<?= $form->field($model, 'icon')->widget(\Iconpicker\Widgets\Iconpicker::className()) 
 php
<?= \Iconpicker\Widgets\Iconpicker::widget([]) 
 php
<?= \Iconpicker\Widgets\Iconpicker::widget([
    'options' => [
        'align' => 'center',
        'arrowClass' => 'btn-primary',
        'arrowPrevIconClass' => 'glyphicon glyphicon-arrow-left',
        'arrowNextIconClass' => 'glyphicon glyphicon-arrow-right',
        'cols' => 4,
        'footer' => true,
        'header' => true,
        'icon' => '',
        'iconset' => 'fontawesome',
        'labelHeader' => '{0} / {1}',
        'labelFooter' => '{0} - {1} of {2}',
        'placement' => 'bottom',
        'rows' => 4,
        'search' => true,
        'searchText' => 'Search icon',
        'selectedClass' => 'btn-warning',
        'unselectedClass' => 'btn-default',
    ],
])