PHP code example of algol-team / library-yii2

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

    

algol-team / library-yii2 example snippets


<?= GridView::widget([
    'dataProvider' => $dataProvider,
    'columns' => [
        [
                'class' => ALGOL_YII::GridColumnExpandOf(),
                'attribute' => 'fTitle',
                'label' => 'Title',
                'onclick' => function ($data) {
                    $FResult = [];
                    if (isset($data['fUrl']) and !empty($data['fUrl'])) {
                        $FResult['value'] = '<i class="fa fa-youtube-play"></i> ' . $data['fTitle'];
                        $FResult['url'] = \yii\helpers\Url::toRoute('info');
                    } else {
                        $FResult['value'] = '<i class="fas fa-folder"></i> ' . $data['fTitle'];
                        $FResult['url'] = yii\helpers\Url::home();
                        $FResult['expand'] = false;
                    }
                    $FResult['data'] = ['id' => $data['ID'], 'hi' => [1, 2, 3]];
                    return $FResult;
                },
        ],
    ],
]) 


    public function actionInfo($id = null) {
        if (isset($id)) {
            $model = Tlink::findOne($id);
            if (isset($model)) return $this->renderAjax('info', ['model' => $model]);
        }
        return 'not found data...';
    }


use yii\widgets\Pjax;

php composer.phar