PHP code example of mihaildev / yii2-backend-theme
1. Go to this page and download the library: Download mihaildev/yii2-backend-theme 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/ */
mihaildev / yii2-backend-theme example snippets
'components' => [
'backendTheme' => [
'class' => 'mihaildev\backendTheme\Component',
'homeUrl' => ['/backend/index'],
'templates' =>
[
'main.block.navbar' => '@app/views/backend/block/navbar',
'main.block.sidebar' => '@app/views/backend/block/sidebar',
// default values
//'main' => '@mihaildev/backendTheme/views/main',
//'clear' =>'@mihaildev/backendTheme/views/clear',
//'main.block.navbar' => '@mihaildev/backendTheme/views/block/navbar',
//'main.block.copyright' => '@mihaildev/backendTheme/views/block/copyright',
//'main.block.sidebar' => '@mihaildev/backendTheme/views/block/sidebar',
//'main.block.settings' => '@mihaildev/backendTheme/views/block/settings',
],
/*
'params' =>
[
'default' => [
'skin' => 'skin-blue'
],
'copyright' => [
'fromYear' => '',
'author' => 'MihailDev',
'url' => 'https://github.com/MihailDev'
],
'mainSettings' => [
'enable' => true,
],
]
*/
],
],
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
\mihaildev\backendTheme\Layout::createMain($this)
->setTitle('Users')
->setBreadcrumbs(['Users']);
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model \mihaildev\user\forms\LoginForm */
$this->title = 'Login';
$this->params['breadcrumbs'][] = $this->title;