6 $params = require __DIR__ . '/params.php';
7 $db = require __DIR__ . '/db.php';
9 require_once __DIR__ . '/myfunctions.php';
13 'name' => 'Inventory',
15 'basePath' => dirname(__DIR__),
16 'language' => 'ru-RU',
17 'bootstrap' => ['log'],
19 '@bower' => '@vendor/bower-asset',
20 '@npm' => '@vendor/npm-asset',
24 // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
25 'cookieValidationKey' => '4u6WczdipA-FIzbuf8PYgjoiid_6zdNy',
27 'pdf' => [ // Формирование PDF по умолчанию
28 'mode' => Pdf::MODE_UTF8, // Кодировка
29 'class' => Pdf::className(),
30 'format' => Pdf::FORMAT_A4, // Лист А4
31 'orientation' => Pdf::ORIENT_PORTRAIT, // Напраление - по вертикали большая сторона
32 'destination' => Pdf::DEST_BROWSER, // Результат показать в браузере
33 'cssFile' => '@vendor/kartik-v/yii2-mpdf/src/assets/kv-mpdf-bootstrap.min.css',
34 'cssInline' => '.kv-heading-1{font-size:18px}',
36 'SetHeader' => [Yii::t('app', Yii::$app->name)], // Верхний колонтитул
37 'SetFooter' => ['{PAGENO}'], // Нижний колонтитул
39 // refer settings section for all configuration options
43 'class' => 'yii\caching\FileCache',
47 'identityClass' => 'app\models\User',
48 'enableAutoLogin' => true,
52 'errorAction' => 'site/error',
56 'class' => 'yii\swiftmailer\Mailer',
57 // send all mails to a file by default. You have to set
58 // 'useFileTransport' to false and configure a transport
59 // for the mailer to send real emails.
60 'useFileTransport' => false,
64 'traceLevel' => YII_DEBUG ? 3 : 0,
67 'class' => 'yii\log\FileTarget',
68 'levels' => ['error', 'warning'],
73 'i18n' => [ // Переводы сообщений
75 '*' => [ // Для всех разделов
76 'class' => 'yii\i18n\PhpMessageSource',
77 'sourceLanguage' => 'en-US', // Исходный текст на английском
78 'basePath' => '@app/messages',
80 'app' => 'app.php', // Для преложения
81 'app/error' => 'error.php', // Для ошибок
82 'contact' => 'contact.php', // Для обратной связи
83 'items' => 'items.php', // Для предметов/оборудования
84 'locations' => 'locations.php', // Для мета расположения
85 'moving' => 'moving.php', // Для перемещений
86 'regions' => 'regions.php', // Для регионов/подразделений
87 'status' => 'status.php', // Для состояний предметов/оборудования
88 'types' => 'types.php', // Для типов предметов/оборудования
96 'enablePrettyUrl' => true,
97 'showScriptName' => false,
107 // configuration adjustments for 'dev' environment
108 $config['bootstrap'][] = 'debug';
109 $config['modules']['debug'] = [
110 'class' => 'yii\debug\Module',
111 // uncomment the following to add your IP if you are not connecting from localhost.
112 'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.68', ],
115 $config['bootstrap'][] = 'gii';
116 $config['modules']['gii'] = [
117 'class' => 'yii\gii\Module',
118 // uncomment the following to add your IP if you are not connecting from localhost.
119 'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.68'],