| Current Path : /var/www/html/eform/frontend/config/ |
| Current File : /var/www/html/eform/frontend/config/main.php |
<?php
$params = array_merge(
require(__DIR__ . '/../../common/config/params.php'),
require(__DIR__ . '/../../common/config/params-local.php'),
require(__DIR__ . '/params.php'),
require(__DIR__ . '/params-local.php')
);
return [
'id' => 'app-frontend',
'basePath' => dirname(__DIR__),
'bootstrap' => [
'backend\modules\installer\SiteBootstrap',
'log'
],
'modules' => [
'loginprovider' => [
'class' => 'frontend\modules\loginprovider\Module'
],
'audit' => [
'class' => 'bedezign\yii2\audit\Audit',
// the layout that should be applied for views within this module
'layout' => 'main',
// Name of the component to use for database access
'db' => 'db',
// List of actions to track. '*' is allowed as the last character to use as wildcard
'trackActions' => ['*'],
// Actions to ignore. '*' is allowed as the last character to use as wildcard (eg 'debug/*')
'ignoreActions' => ['audit/*', 'debug/*'],
// Maximum age (in days) of the audit entries before they are truncated
'maxAge' => 'debug',
// IP address or list of IP addresses with access to the viewer, null for everyone (if the IP matches)
'accessIps' => null,
// Role or list of roles with access to the viewer, null for everyone (if the user matches)
'accessRoles' => null,
// User ID or list of user IDs with access to the viewer, null for everyone (if the role matches)
'accessUsers' => [24],
// Compress extra data generated or just keep in text? For people who don't like binary data in the DB
'compressData' => true,
// The callback to use to convert a user id into an identifier (username, email, ...). Can also be html.
'userIdentifierCallback' => ['common\models\FrontendUser', 'userIdentifierCallback'],
// If the value is a simple string, it is the identifier of an internal to activate (with default settings)
// If the entry is a '<key>' => '<string>|<array>' it is a new panel. It can optionally override a core panel or add a new one.
'panels' => [
'audit/request',
'audit/error',
'audit/trail',
// 'app/views' => [
// 'class' => 'app\panels\ViewsPanel',
// // ...
// ],
],
'panelsMerge' => [
// ... merge data (see below)
]
],
],
'controllerNamespace' => 'frontend\controllers',
'controllerMap' => [
'e-travel' => 'frontend\controllers\etravel\ETravelController',
'e-amla' => 'frontend\controllers\eamla\EAmlaController',
],
'components' => [
'queue' => [
'class' => \yii\queue\db\Queue::class,
'db' => 'db', // DB connection component or its config
'tableName' => '{{%queue}}', // Table name
'channel' => 'default', // Queue channel key
'mutex' => \yii\mutex\MysqlMutex::class, // Mutex used to sync queries
],
'user' => [
'identityClass' => 'common\models\FrontendUser',
'enableAutoLogin' => false,
],
'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
],
],
'errorHandler' => [
'errorAction' => 'site/error',
],
'assetManager' => [
'bundles' => [
'yii\web\JqueryAsset' => [
'js'=>[] // use jquery include in theme file
],
],
],
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'enableStrictParsing' => false,
'rules' => [
// E-Travel controller routes
'eform/e-travel/<action>' => 'e-travel/<action>',
'eform/e-amla/<action>' => 'e-amla/<action>',
[
'pattern' => 'web/<frontendpage>/<params>',
'route' => 'site/index',
'defaults' => [
'frontendpage' => '',
'params' => '',
]
],
[
'pattern' => 'portal-main/<frontendpage>/<params>',
'route' => 'site/index',
'defaults' => [
'frontendpage' => 'home',
'params' => '',
]
],
[
'pattern' => 'lawyer/<frontendpage>/<params>',
'route' => 'site/index',
'defaults' => [
'frontendpage' => 'home',
'params' => '',
]
],
//'main/<page>' => 'site/page',
],
],
],
'params' => $params,
];