PHP code example of wokster / yii2-adminlte-widgets

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

    

wokster / yii2-adminlte-widgets example snippets


     BoxWidget::begin([
        'title' => 'Some title', //string
        'border' => false,       //boolean
        'color' => 'default',    //bootstrap color name 'success', 'danger' еtс.
        'solid' => false,        //boolean
        'padding' => true,       //boolean
        'footer' => false,       //boolean or html to render footer
        'collapse' => true,      //boolean Default AdminLTE button for collapse box
        'close' => false,        //boolean Default AdminLTE button for remove box
        'hide' => false,         //boolean collapsed or not
        'buttons' => [           //array with config to add custom buttons or links
              //sample for links, like in default gii view template
              ['link', '<i class="fa fa-times text-danger" aria-hidden="true"></i>',['delete', 'id' => $model->id],[
                'data-toggle'=>'tooltip', 'data-original-title'=>'delete it',
                'data' => [
                'confirm' => 'Вы уверены, что хотите безвозвратно удалить партнера?',
                'method' => 'post',
              ],]],
              ['link', '<i class="fa fa-pencil" aria-hidden="true"></i>',['update','id' => $model->id],['data-toggle'=>'tooltip', 'data-original-title'=>'update it']],
              //sample for custom button
              ['button', '<i class="fa fa-cog"></i>', ['class'=>'btn btn-box-tool', 'data-toggle'=>'tooltip', 'data-original-title'=>'some tooltip']]
        ],
    ]);
    

    'modules' => [
    ....
        'gii' => [
            'class' => 'yii\gii\Module',
            'allowedIPs' => ['*'],
            'generators' => [
                'tcrud'   => [
                    'class'     => '\wokster\ltewidgets\generators\tcrud\Generator',
                ],
                'tmodel'   => [
                    'class'     => '\wokster\ltewidgets\generators\tmodel\Generator',
                ]
            ]
        ],
    ....
    ],

php composer.phar