PHP code example of obregonco / yii2-semantic-ui

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

    

obregonco / yii2-semantic-ui example snippets




namespace backend\assets;

use yii\web\AssetBundle;

class AppAsset extends AssetBundle
{
    public $basePath = '@webroot';
    public $baseUrl = '@web';
    public $css = [];
    public $js = [];
    public $depends = [
        'yii\web\YiiAsset',
        'yii\web\JqueryAsset',
        'obregonco\SemanticUI\assets\SemanticUICSSAsset'
    ];
}

Yii::$container->set(\yii\grid\GridView::className(), \obregonco\SemanticUI\widgets\GridView::class);
Yii::$container->set(\yii\widgets\ActiveForm::className(), \obregonco\SemanticUI\widgets\ActiveForm::class);
Yii::$container->set(\yii\bootstrap\ActiveForm::className(), \obregonco\SemanticUI\widgets\ActiveForm::class);
Yii::$container->set(\yii\widgets\Breadcrumbs::className(), \obregonco\SemanticUI\collections\Breadcrumb::class);
Yii::$container->set(\yii\grid\CheckboxColumn::className(), \obregonco\SemanticUI\widgets\CheckboxColumn::class);

                $form->field($model, 'username')->label(false)->textInput([
                    'autofocus' => true,
                    'placeHolder' => $model->getAttributeLabel('username'),
                    'uiOptions' => [
                            'appendTo' => '<i class="user icon"></i>',
                            'class' => 'ui left icon input',
                    ]
                ])


php composer.phar