PHP code example of insolita / yii2-adminlte-widgets

1. Go to this page and download the library: Download insolita/yii2-adminlte-widgets 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-adminlte-widgets example snippets


'components'=>[
//--------
     'assetManager'=>[
                 'class'=>'yii\web\AssetManager',
                 'bundles'=>[
                 //--------
                     'insolita\wgadminlte\JsCookieAsset'=>[
                           'depends'=>[
                               'yii\web\YiiAsset',
                               'namespace\for\AdminLteAsset', // for example 'dmstr\web\AdminLteAsset', if we use https://github.com/dmstr/yii2-adminlte-asset
                          ]
                     ],
                      'insolita\wgadminlte\CollapseBoxAsset'=>[
                            'depends'=>[
                                'insolita\wgadminlte\JsCookieAsset'
                            ]
                      ],
             ],
     ]
//--------

]


     \insolita\wgadminlte\LteBox::begin([
             'type'=>\insolita\wgadminlte\LteConst::TYPE_INFO,
             'isSolid'=>true,
             'boxTools'=>'<button class="btn btn-success btn-xs create_button" ><i class="fa fa-plus-circle"></i> Add</button>',
             'tooltip'=>'this tooltip description',
             'title'=>'Manage users',
             'footer'=>'total 44 active users',
         ])

    \insolita\wgadminlte\LteBox::begin([
               'type'=>\insolita\wgadminlte\LteConst::COLOR_MAROON,
               'tooltip'=>'Useful information!',
               'title'=>'Attention!',
               'isTile'=>true
           ])

      \insolita\wgadminlte\LteBox::widget([
                 'type'=>\insolita\wgadminlte\LteConst::COLOR_MAROON,
                 'tooltip'=>'Useful information!',
                 'title'=>'Attention!',
                 'isTile'=>true,
                 'body'=>'Some Box content'
             ])

     \insolita\wgadminlte\CollapseBox::begin([
             'type'=>\insolita\wgadminlte\LteConst::TYPE_INFO,
             'collapseRemember' => true,
             'collapseDefault' => false,
             'isSolid'=>true,
             'boxTools'=>'<button class="btn btn-success btn-xs create_button" ><i class="fa fa-plus-circle"></i> Добавить</button>',
             'tooltip'=>'Описание содаржимого',
             'title'=>'Управление пользователями',
         ])

    echo \insolita\wgadminlte\LteSmallBox::widget([
	                    'type'=>\insolita\wgadminlte\LteConst::COLOR_LIGHT_BLUE,
	                    'title'=>'90%',
	                    'text'=>'Free Space',
	                    'icon'=>'fa fa-cloud-download',
	                    'footer'=>'See All <i class="fa fa-hand-o-right"></i>',
	                    'link'=>Url::to("/user/list")
	                ]);

    echo \insolita\wgadminlte\LteInfoBox::widget([
                       'bgIconColor'=>\insolita\wgadminlte\LteConst::COLOR_AQUA,
                       'bgColor'=>'',
                       'number'=>100500,
                       'text'=>'Test Three',
                       'icon'=>'fa fa-bolt',
                       'showProgress'=>true,
                       'progressNumber'=>66,
                       'description'=>'Something about this'
                   ])

    \insolita\wgadminlte\Callout::widget([
            'type'=>\insolita\wgadminlte\LteConst::TYPE_WARNING,
            'head'=>'Operation Complete',
            'text'=>'Something text bla-bla-bla bla-bla-blabla-bla-blabla-bla-blabla-bla-blabla-bla-blabla-bla-bla'
        ]);

   <?=\insolita\wgadminlte\Alert::widget([
              'type'=>\insolita\wgadminlte\LteConst::TYPE_SUCCESS,
              'text'=>'Operation Complete',
              'closable'=>true
          ]);

    <?= \insolita\wgadminlte\FlashAlerts::widget([
        'errorIcon' => '<i class="fa fa-warning"></i>',
        'successIcon' => '<i class="fa fa-check"></i>',
        'successTitle' => 'Done!', //for non-titled type like 'success-first'
        'closable' => true,
        'encode' => false,
        'bold' => false,
    ]); 

Yii::$app->session->setFlash('info1','Message1');
Yii::$app->session->setFlash('info2','Message2');
Yii::$app->session->setFlash('info3','Message3');
Yii::$app->session->setFlash('success-first','Message');
Yii::$app->session->setFlash('success-second','Message');

 
   \insolita\wgadminlte\LteChatBox::begin([
       'type' => \insolita\wgadminlte\LteConst::TYPE_PRIMARY,
       'footer'=>'<input type="text" name="newMessage">',
       'title'=>'Messages',
       'boxTools' => '<button class="btn btn-xs"><i class="fa fa-refresh"></i></button>'
       ]);
      echo \insolita\wgadminlte\LteChatMessage::widget([
          'isRight' => false,
          'author' => 'Artur Green',
          'message' => 'Some message bla-bla',
          'image'=>'https://almsaeedstudio.com/themes/AdminLTE/dist/img/user3-128x128.jpg',
          'createdAt' => '5 minutes ago'
]);
      echo  \insolita\wgadminlte\LteChatMessage::widget([
                'isRight' => true,
                'author' => 'Jane Smith',
                'message' => 'Some message bla-bla',
                'image'=>'https://almsaeedstudio.com/themes/AdminLTE/dist/img/user1-128x128.jpg',
                'createdAt' => '2017-23-03 17:33'
      ]);
   \insolita\wgadminlte\LteChatBox::end();


   \insolita\wgadminlte\LteSetup::widget([
       'animationSpeed' => 'fast',
       'enableFastclick' => false,
       'navbarMenuSlimscroll'=>false
       //etc...
]);

php composer.phar