new-support.webeffector.ru/common/config/main.php

59 lines
1.7 KiB
PHP

<?php
use yii\i18n\Formatter;
use yii\rbac\DbManager;
use yii\caching\FileCache;
use yii\caching\DummyCache;
use yii\i18n\PhpMessageSource;
return [
'aliases' => [
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
],
'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
'components' => [
'formatter' => [
'class' => Formatter::class,
'defaultTimeZone' => 'Europe/Moscow',
'currencyCode' => 'rub',
],
'cache' => [
'class' => YII_ENV_DEV ? DummyCache::class : FileCache::class,
],
'authManager' => [
'class' => DbManager::class,
],
'assetManager' => [
// timeStamp css files
'appendTimestamp' => YII_ENV_DEV, //true|false
],
'i18n' => [
'translations' => [
'app*' => [
'class' => PhpMessageSource::class,
'basePath' => '@common/messages',
'fileMap' => [
'app' => 'app.php',
'error' => 'error.php',
],
],
'user*' => [
'class' => PhpMessageSource::class,
'basePath' => '@backend/modules/user/messages',
'fileMap' => [
'user' => 'user.php',
],
],
'schema*' => [
'class' => PhpMessageSource::class,
'basePath' => '@frontend/modules/schema/messages',
'fileMap' => [
'schema' => 'schema.php',
],
],
],
],
],
];