7 $params = require __DIR__ . '/params.php';
8 $db = require __DIR__ . '/db.php';
10 require_once __DIR__ . '/myfunctions.php';
14 'name' => 'Inventory',
16 'basePath' => dirname(__DIR__),
17 'language' => 'ru-RU',
18 'bootstrap' => ['log'],
20 '@bower' => '@vendor/bower-asset',
21 '@npm' => '@vendor/npm-asset',
25 'yii\widgets\LinkPager' => [
26 'firstPageLabel' => Html::tag('span', '', [ 'class' => 'glyphicon glyphicon-fast-backward', ]),
27 'prevPageLabel' => Html::tag('span', '', [ 'class' => 'glyphicon glyphicon-backward', ]),
28 'nextPageLabel' => Html::tag('span', '', [ 'class' => 'glyphicon glyphicon-forward', ]),
29 'lastPageLabel' => Html::tag('span', '', [ 'class' => 'glyphicon glyphicon-fast-forward', ]),
35 // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
36 'cookieValidationKey' => '4u6WczdipA-FIzbuf8PYgjoiid_6zdNy',
38 'pdf' => [ // Формирование PDF по умолчанию
39 'mode' => Pdf::MODE_UTF8, // Кодировка
40 'class' => Pdf::className(),
41 'format' => Pdf::FORMAT_A4, // Лист А4
42 'orientation' => Pdf::ORIENT_PORTRAIT, // Напраление - по вертикали большая сторона
43 'destination' => Pdf::DEST_BROWSER, // Результат показать в браузере
44 'cssFile' => '@vendor/kartik-v/yii2-mpdf/src/assets/kv-mpdf-bootstrap.min.css',
45 'cssInline' => '.kv-heading-1{font-size:18px}',
47 'SetHeader' => [Yii::t('app', Yii::$app->name)], // Верхний колонтитул
48 'SetFooter' => ['{PAGENO}'], // Нижний колонтитул
50 // refer settings section for all configuration options
54 'class' => 'yii\caching\FileCache',
58 'identityClass' => 'app\models\User',
59 'enableAutoLogin' => true,
61 // Авторизация пользователей из БД
63 'class' => 'yii\rbac\DbManager',
64 'defaultRoles' => [ 'admin', 'woker' ],
68 'errorAction' => 'site/error',
72 'class' => 'yii\swiftmailer\Mailer',
73 // send all mails to a file by default. You have to set
74 // 'useFileTransport' to false and configure a transport
75 // for the mailer to send real emails.
76 'useFileTransport' => false,
80 'traceLevel' => YII_DEBUG ? 3 : 0,
83 'class' => 'yii\log\FileTarget',
84 'levels' => ['error', 'warning'],
89 'i18n' => [ // Переводы сообщений
91 '*' => [ // Для всех разделов
92 'class' => 'yii\i18n\PhpMessageSource',
93 'sourceLanguage' => 'en-US', // Исходный текст на английском
94 'basePath' => '@app/messages',
96 'app' => 'app.php', // Для преложения
97 'app/error' => 'error.php', // Для ошибок
98 'contact' => 'contact.php', // Для обратной связи
99 'import' => 'import.php', // Для импорта. Обозначение полей таблицы
100 'items' => 'items.php', // Для предметов/оборудования
101 'locations' => 'locations.php', // Для мета расположения
102 'models' => 'models.php', // Для моделей предметов/оборудования
103 'moving' => 'moving.php', // Для перемещений
104 'regions' => 'regions.php', // Для регионов/подразделений
105 'status' => 'status.php', // Для состояний предметов/оборудования
106 'types' => 'types.php', // Для типов предметов/оборудования
107 'users' => 'users.php', // Для пользователей
115 'enablePrettyUrl' => true,
116 'showScriptName' => false,
126 // configuration adjustments for 'dev' environment
127 $config['bootstrap'][] = 'debug';
128 $config['modules']['debug'] = [
129 'class' => 'yii\debug\Module',
130 // uncomment the following to add your IP if you are not connecting from localhost.
131 'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.68', ],
134 $config['bootstrap'][] = 'gii';
135 $config['modules']['gii'] = [
136 'class' => 'yii\gii\Module',
137 // uncomment the following to add your IP if you are not connecting from localhost.
138 'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.68'],