<?php return ['layoutPath' => dirname(__DIR__) . '/views/layouts/', 'components' => ['user' => ['identityClass' => 'vendor\\codefire\\cfusermgmt\\models\\User', 'enableAutoLogin' => true], 'authManager' => ['class' => 'yii\\rbac\\DbManager', 'defaultRoles' => [DEFAULT_ROLE_NAME]], 'custom' => ['class' => 'vendor\\codefire\\cfusermgmt\\components\\Custom']], 'params' => ['home_base_path' => __DIR__ . '/../../../../'], 'modules' => ['usermgmt' => ['class' => 'vendor\\codefire\\cfusermgmt\\Module']], 'aliases' => ['@cfusermgmt' => '@app/../vendor/codefire/cfusermgmt', '@cfusermgmtView' => '@vendor/codefire/cfusermgmt/views', "@cfusermgmtWeb" => "vendor/codefire/cfusermgmt/web", '@SITE_URL' => "Your Site url Goes Here"], 'on beforeAction' => function ($event) { vendor\codefire\cfusermgmt\models\UserActivity::actionSave($event); $permission = \vendor\codefire\cfusermgmt\models\User::CheckPermission($event); if (Yii::$app->user->isGuest && !$permission) { Yii::$app->session->setFlash("danger", FLASH_1041, true); Yii::$app->session->set("currentUrl", yii\helpers\Url::current()); header("location:" . yii\helpers\Url::home(true) . 'usermgmt/user/login'); exit; //return Yii::$app->controller->redirect(['/usermgmt/user/login']); } elseif (!$permission) { return Yii::$app->controller->redirect(['/usermgmt/user/permission-denied']); } $userRoleData = \vendor\codefire\cfusermgmt\models\AuthAssignment::find()->where(['user_id' => Yii::$app->user->getId()])->one(); if (in_array(Yii::$app->controller->module->id, array('usermgmt', 'content'))) { $setLayout =& Yii::$app->controller->module->module; } else { $setLayout =& Yii::$app->controller->module; } if (!empty($userRoleData)) { $userRoleName = $userRoleData->item_name; if (in_array($userRoleName, array(ADMIN_ROLE_ALIAS, SUPERADMIN_ROLE_ALIAS))) { $setLayout->layout = ADMIN_LAYOUT; } else { $setLayout->layout = DEFAULT_LAYOUT; } } else { $setLayout->layout = DEFAULT_LAYOUT; } }];
/images/favicon.png" rel="shortcut icon"> <?php echo Html::csrfMetaTags(); ?> <title><?php echo Html::encode($this->title); ?> </title> <?php $this->head(); ?> </head> <script> var SITE_URL = '<?php echo yii\helpers\Url::home(true); ?> '; </script> <?php $this->beginBody(); ?> <?php include 'header.php'; ?> <div class="success_message"> <?php echo $this->render("@cfusermgmtView/shared/flash_msg"); ?> </div> <?php
$active2 = ' active'; } if (strpos($route, trim($menu3['url'][0], '/')) === 0) { $this->title = $menu3['label']; } $icon3 = isset($menu3['icon']) ? $menu3['icon'] : 'glyphicon glyphicon-link'; } $items2[] = ['label' => $menu2['label'], 'icon' => $icon2, 'url' => $menu2['url'], 'options' => ['class' => $active2], 'items' => $menus3]; } $color = ''; if (count($items2) > 0) { $color = ' stick ' . $colors[$idx++]; } $items[] = ['label' => $menu['label'], 'icon' => $icon, 'url' => $menu['url'], 'options' => ['class' => $active . ' ' . $color], 'items' => $items2]; } echo SideNavMetro::widget(['items' => !empty($items) ? $items : [['url' => yii\helpers\Url::home(), 'label' => 'Home', 'icon' => 'glyphicon glyphicon-home', 'active' => true]], 'iconPrefix' => '']); ?> </section> </aside> <aside class="right-side"> <section class="content-header"> <h1><?php echo Html::encode($this->title); ?> </h1> </section> <?php echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]); ?> <section class="content">
$active3 = ' active'; } if ($active3 == ' active') { $active2 = ' active'; } if (strpos($route, trim($menu3['url'][0], '/')) === 0) { $this->title = $menu3['label']; } $icon3 = isset($menu3['icon']) ? $menu3['icon'] : 'glyphicon glyphicon-link'; } $items2[] = ['label' => $menu2['label'], 'icon' => $icon2, 'url' => $menu2['url'], 'options' => ['class' => $active2], 'items' => $menus3]; } $items[] = ['label' => $menu['label'], 'icon' => $icon, 'url' => $menu['url'], 'options' => ['class' => $active], 'items' => $items2]; } $this->params['sideMenu'] = $items; echo SideNav::widget(['items' => isset($this->params['sideMenu']) ? $this->params['sideMenu'] : [['url' => yii\helpers\Url::home(), 'label' => 'Home', 'icon' => 'glyphicon glyphicon-home', 'active' => true]], 'iconPrefix' => '']); ?> </section> </aside> <aside class="right-side"> <section class="content-header"> <h1><?php echo Html::encode($this->title); ?> </h1> </section> <?php echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]); ?> <section class="content">