6 $params = require __DIR__ . '/params.php';
7 $db = require __DIR__ . '/db.php';
9 function showUrlUpdate($name, $data) {
10 return Html::a(Html::encode($name), ['update', 'id' => $data->id]);
16 'name' => 'Inventory',
18 'basePath' => dirname(__DIR__),
19 'language' => 'ru-RU',
20 'bootstrap' => ['log'],
22 '@bower' => '@vendor/bower-asset',
23 '@npm' => '@vendor/npm-asset',
27 // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
28 'cookieValidationKey' => '4u6WczdipA-FIzbuf8PYgjoiid_6zdNy',
31 'mode' => Pdf::MODE_UTF8,
32 'class' => Pdf::className(),
33 'format' => Pdf::FORMAT_A4,
34 'orientation' => Pdf::ORIENT_PORTRAIT,
35 'destination' => Pdf::DEST_BROWSER,
36 'cssFile' => '@vendor/kartik-v/yii2-mpdf/src/assets/kv-mpdf-bootstrap.min.css',
37 'cssInline' => '.kv-heading-1{font-size:18px}',
39 'SetHeader' => [Yii::t('app', 'Inventory')],
40 'SetFooter' => ['{PAGENO}'],
42 // 'defaultFont' => 'DejaVu Sans',
43 // refer settings section for all configuration options
49 'class' => 'robregonm\pdf\PdfResponseFormatter',
52 'title' => 'Document',
58 'class' => 'yii\caching\FileCache',
61 'identityClass' => 'app\models\User',
62 'enableAutoLogin' => true,
65 'errorAction' => 'site/error',
68 'class' => 'yii\swiftmailer\Mailer',
69 // send all mails to a file by default. You have to set
70 // 'useFileTransport' to false and configure a transport
71 // for the mailer to send real emails.
72 'useFileTransport' => false,
75 'traceLevel' => YII_DEBUG ? 3 : 0,
78 'class' => 'yii\log\FileTarget',
79 'levels' => ['error', 'warning'],
86 'class' => 'yii\i18n\PhpMessageSource',
87 'sourceLanguage' => 'en-US',
88 'basePath' => '@app/messages',
91 'app/error' => 'error.php',
95 'class' => 'yii\i18n\PhpMessageSource',
96 'sourceLanguage' => 'en-US',
97 'basePath' => '@app/messages',
99 'app' => 'contact.app',
103 'class' => 'yii\i18n\PhpMessageSource',
104 'sourceLanguage' => 'en-US',
105 'basePath' => '@app/messages',
107 'app' => 'items.app',
111 'class' => 'yii\i18n\PhpMessageSource',
112 'sourceLanguage' => 'en-US',
113 'basePath' => '@app/messages',
115 'app' => 'locations.app',
119 'class' => 'yii\i18n\PhpMessageSource',
120 'sourceLanguage' => 'en-US',
121 'basePath' => '@app/messages',
123 'app' => 'moving.app',
127 'class' => 'yii\i18n\PhpMessageSource',
128 'sourceLanguage' => 'en-US',
129 'basePath' => '@app/messages',
131 'app' => 'regions.app',
135 'class' => 'yii\i18n\PhpMessageSource',
136 'sourceLanguage' => 'en-US',
137 'basePath' => '@app/messages',
139 'app' => 'status.app',
143 'class' => 'yii\i18n\PhpMessageSource',
144 'sourceLanguage' => 'en-US',
145 'basePath' => '@app/messages',
147 'app' => 'types.app',
155 'enablePrettyUrl' => true,
156 'showScriptName' => false,
166 // configuration adjustments for 'dev' environment
167 $config['bootstrap'][] = 'debug';
168 $config['modules']['debug'] = [
169 'class' => 'yii\debug\Module',
170 // uncomment the following to add your IP if you are not connecting from localhost.
171 'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.68'],
174 $config['bootstrap'][] = 'gii';
175 $config['modules']['gii'] = [
176 'class' => 'yii\gii\Module',
177 // uncomment the following to add your IP if you are not connecting from localhost.
178 'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.68'],