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 // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
26 'cookieValidationKey' => '4u6WczdipA-FIzbuf8PYgjoiid_6zdNy',
28 'pdf' => [ // Формирование PDF по умолчанию
29 'mode' => Pdf::MODE_UTF8, // Кодировка
30 'class' => Pdf::className(),
31 'format' => Pdf::FORMAT_A4, // Лист А4
32 'orientation' => Pdf::ORIENT_PORTRAIT, // Напраление - по вертикали большая сторона
33 'destination' => Pdf::DEST_BROWSER, // Результат показать в браузере
34 'cssFile' => '@vendor/kartik-v/yii2-mpdf/src/assets/kv-mpdf-bootstrap.min.css',
35 'cssInline' => '.kv-heading-1{font-size:18px}',
37 'SetHeader' => [Yii::t('app', Yii::$app->name)], // Верхний колонтитул
38 'SetFooter' => ['{PAGENO}'], // Нижний колонтитул
40 // refer settings section for all configuration options
44 'class' => 'yii\caching\FileCache',
48 'identityClass' => 'app\models\User',
49 'enableAutoLogin' => true,
51 // Авторизация пользователей из БД
53 'class' => 'yii\rbac\DbManager',
54 'defaultRoles' => [ 'admin', 'woker' ],
58 'errorAction' => 'site/error',
62 'class' => 'yii\swiftmailer\Mailer',
63 // send all mails to a file by default. You have to set
64 // 'useFileTransport' to false and configure a transport
65 // for the mailer to send real emails.
66 'useFileTransport' => false,
70 'traceLevel' => YII_DEBUG ? 3 : 0,
73 'class' => 'yii\log\FileTarget',
74 'levels' => ['error', 'warning'],
79 'i18n' => [ // Переводы сообщений
82 'class' => 'yii\i18n\PhpMessageSource',
83 'sourceLanguage' => 'en-US', // Исходный текст на английском
84 'basePath' => '@app/messages',
86 'app' => 'app.php', // Для приложения
87 'app/error' => 'error.php', // Для ошибок
88 'contact' => 'contact.php', // Для обратной связи
89 'import' => 'import.php', // Для импорта. Обозначение полей таблицы
90 'items' => 'items.php', // Для предметов/оборудования
91 'locations' => 'locations.php', // Для мета расположения
92 'models' => 'models.php', // Для моделей предметов/оборудования
93 'moving' => 'moving.php', // Для перемещений
94 'regions' => 'regions.php', // Для регионов/подразделений
95 'status' => 'status.php', // Для состояний предметов/оборудования
96 'types' => 'types.php', // Для типов предметов/оборудования
97 'users' => 'users.php', // Для пользователей
105 'enablePrettyUrl' => true,
106 'showScriptName' => false,
114 'yii\widgets\LinkPager' => [
115 'firstPageLabel' => Html::tag('span', '', [ 'class' => 'glyphicon glyphicon-fast-backward', 'title' => 'Первая страница', ]),
116 'prevPageLabel' => Html::tag('span', '', [ 'class' => 'glyphicon glyphicon-backward', 'title' => 'Предыдущая страница', ]),
117 'nextPageLabel' => Html::tag('span', '', [ 'class' => 'glyphicon glyphicon-forward', 'title' => 'Следующая страница', ]),
118 'lastPageLabel' => Html::tag('span', '', [ 'class' => 'glyphicon glyphicon-fast-forward', 'title' => 'Последняя страница', ]),
119 // 'firstPageLabel' => Html::tag('span', '', [ 'class' => 'glyphicon glyphicon-fast-backward', 'title' => Yii::t('app', 'First page'), ]),
120 // 'prevPageLabel' => Html::tag('span', '', [ 'class' => 'glyphicon glyphicon-backward', 'title' => Yii::t('app', 'Previous page'), ]),
121 // 'nextPageLabel' => Html::tag('span', '', [ 'class' => 'glyphicon glyphicon-forward', 'title' => Yii::t('app', 'Next page'), ]),
122 // 'lastPageLabel' => Html::tag('span', '', [ 'class' => 'glyphicon glyphicon-fast-forward', 'title' => Yii::t('app', 'Last page'), ]),
130 // configuration adjustments for 'dev' environment
131 $config['bootstrap'][] = 'debug';
132 $config['modules']['debug'] = [
133 'class' => 'yii\debug\Module',
134 // uncomment the following to add your IP if you are not connecting from localhost.
135 'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.68', ],
138 $config['bootstrap'][] = 'gii';
139 $config['modules']['gii'] = [
140 'class' => 'yii\gii\Module',
141 // uncomment the following to add your IP if you are not connecting from localhost.
142 'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.68'],