$params = require __DIR__ . '/params.php';
$db = require __DIR__ . '/db.php';
$dbzp = require __DIR__ . '/dbzp.php';
$dbpg = require __DIR__ . '/dbpg.php';
$dbpgx = require __DIR__ . '/dbpgx.php';
$dbbeau = require __DIR__ . '/dbbeau.php';
$dbpggis = require __DIR__ . '/dbpggis.php';
$dboracle = require __DIR__ . '/dboracle.php';
$config = [
'id' => 'zp4basic',
'name' => 'Zusatzprogramme (ZP4)',
'basePath' => dirname(__DIR__),
'bootstrap' => ['log'],
'language' => 'de-DE',
'modules' => require(__DIR__ . '/modules.php'),
'aliases' => [
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
],
'components' => [
'request' => [
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
'cookieValidationKey' => '99v2C19iNBxLOQK34O3EC28XUAQQUDIT',
'parsers' => [
'application/json' => 'yii\web\JsonParser',
],
],
'cache' => [
'class' => 'yii\caching\FileCache',
],
'user' => [
'identityClass' => 'app\models\User',
'enableAutoLogin' => true,
'identityCookie' =>[
'name' => '_idzp4dev',
]
],
'session' => [
// this is the name of the session cookie used for login on the backend
'name' => 'zp4dev',
],
'errorHandler' => [
'errorAction' => 'site/error',
],
'mailer' => [
'class' => \yii\symfonymailer\Mailer::class,
'viewPath' => '@app/mail',
// send all mails to a file by default.
'useFileTransport' => false,
'transport' => [
'scheme' => 'smtp',
'host' => 'mail.lwk-rlp.de',
'username' => 'weinbauzp',
'password' => '#########',
'port' => 587,
//'dsn' => 'native://default',
'options' => [
'verify_peer' => 0,
],
],
],
'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
],
],
'logger' => [
'class' => 'app\models\Logger',
],
'db' => $db,
'dbpg' => $dbpg,
'dbpgx' => $dbpgx,
'dbbeau' => $dbbeau,
'dbpggis' => $dbpggis,
'dbzp' => $dbzp,
'dboracle' => $dboracle,
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
],
],
'formatter' => [
'dateFormat' => 'dd.MM.yyyy',
'timeFormat' => 'HH:mm',
'defaultTimeZone' => 'Europe/Berlin',
'decimalSeparator' => ',',
'thousandSeparator' => '',
'currencyCode' => 'EUR',
'nullDisplay' => '',
'booleanFormat' => ['□', '■'],
//'booleanFormat' => ['○', '●'],
],
],
'as beforeRequest' => [
'class' => 'yii\filters\AccessControl',
'rules' => [
[
'actions' => ['about', 'contact' , 'login', 'error'],
'allow' => true,
],
[
'allow' => true,
'roles' => ['@'],
],
],
],
'params' => $params,
];
if (YII_ENV_DEV) {
// configuration adjustments for 'dev' environment
$config['bootstrap'][] = 'debug';
$config['modules']['debug'] = [
'class' => 'yii\debug\Module',
// uncomment the following to add your IP if you are not connecting from localhost.
//'allowedIPs' => ['127.0.0.1', '::1'],
];
$config['bootstrap'][] = 'gii';
$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
// uncomment the following to add your IP if you are not connecting from localhost.
//'allowedIPs' => ['127.0.0.1', '::1'],
];
}
return $config;