<?php
$params = array_merge(
    require(__DIR__ . '/../../common/config/params.php'), require(__DIR__ . '/../../common/config/params-local.php'), require(__DIR__ . '/params.php'), require(__DIR__ . '/params-local.php')
);

return [
    'id' => 'home',
    'basePath' => dirname(__DIR__),
    'bootstrap' => ['log'],
    'controllerNamespace' => 'home\controllers',
    'modules' => [
        'test' => [
            'class' => 'home\modules\test\Module',
        ],
        'task' => [
            'class' => 'home\modules\task\Module',
        ],
        'project' => [
            'class' => 'home\modules\project\Module',
        ],
        'customer' => [
            'class' => 'home\modules\customer\Module',
        ],
        'sale' => [
            'class' => 'home\modules\sale\Module',
        ],
        'contract' => [
            'class' => 'home\modules\contract\Module',
        ],
        'receivable' => [
            'class' => 'home\modules\receivable\Module',
        ],
        'blog' => [
            'class' => 'home\modules\blog\Module',
        ],
        'plan' => [
            'class' => 'home\modules\plan\Module',
        ],
        'reimbursement' => [
            'class' => 'home\modules\reimbursement\Module',
        ],
        'workflow' => [
            'class' => 'home\modules\workflow\Module',
        ],
        'statement' => [
            'class' => 'home\modules\statement\Module',
        ],
        'schedule' => [
            'class' => 'home\modules\schedule\Module',
        ],
        'delivery' => [
            'class' => 'home\modules\delivery\Module',
        ],
    ],
    'components' => [
        'user' => [
            'identityClass' => 'common\models\User',
            'enableAutoLogin' => false,
            'loginUrl' => ['public/login'],
            'on afterLogin' => ['common\models\User', 'updateLoginLog'],
        ],
        'log' => [
            'traceLevel' => YII_DEBUG ? 3 : 0,
            'targets' => [
                'file' => [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['error', 'warning'],
                ],
            ],
        ],
        'errorHandler' => [
            'errorAction' => 'site/error',
        ],
    ],
    'params' => $params,
];
