PHP code example of wolfpack-it / yii2-admin-lte
1. Go to this page and download the library: Download wolfpack-it/yii2-admin-lte 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/ */
wolfpack-it / yii2-admin-lte example snippets
$this->registerAssetBundle(\WolfpackIT\adminLte\bundles\AdminLteBundle::class);
echo \yii\bootstrap4\NavBar::begin([
'options' => [
'class' => ['main-header', 'navbar-expand', 'navbar-light', 'border-bottom'],
],
'renderInnerContainer' => false
]);
echo \yii\bootstrap4\Nav::widget([
'options' => ['class' => 'navbar-nav'],
'items' => [
['label' => \kartik\icons\Icon::show('bars'), 'linkOptions' => ['data-widget' => 'pushmenu'], 'encode' => false],
],
]);
echo \yii\bootstrap4\Nav::widget([
'options' => ['class' => 'navbar-nav ml-auto'],
'items' => [
['label' => \Yii::t( 'app', 'Home'), 'url' => \Yii::$app->homeUrl],
],
]);
NavBar::end();
\WolfpackIT\adminLte\widgets\SideNavBar::begin([
'brandLabel' => \Yii::t('app', 'Urban Journalist'),
'brandTextOptions' => ['class' => ['font-weight-light']],
'brandUrl' => ['/'],
]);
echo \WolfpackIT\adminLte\widgets\SideNavBarUserPanel::widget([
'icon' => 'user-secret',
'label' => 'Guest',
'url' => ['session/create']
]);
echo \WolfpackIT\adminLte\widgets\SideNav::widget([
'items' => [
[
'icon' => 'home',
'label' => \Yii::t('app', 'Home'),
'url' => ['site/index'],
],
[
'icon' => 'star',
'label' => \Yii::t('app', 'Submenu'),
'items' => [
[
'icon' => 'circle',
'label' => \Yii::t('app', 'Submenu item'),
'url' => ['site/index'],
]
]
]
],
]);
\WolfpackIT\adminLte\widgets\SideNavBar::end();