Browse Source

Frontend settings params load

master
Egorka 6 years ago
parent
commit
e0c5bc936b
  1. 5
      frontend/bootstrap/SetUp.php

5
frontend/bootstrap/SetUp.php

@ -2,6 +2,7 @@
namespace frontend\bootstrap;
use core\entities\Settings;
use yii\base\BootstrapInterface;
use yii\base\Theme;
use yii\helpers\ArrayHelper;
@ -24,7 +25,9 @@ class SetUp implements BootstrapInterface
], $args));
});
// Connect frontend modules
// Load settings
$settings = ArrayHelper::map(Settings::find()->andWhere(['active' => 1])->all(), 'key', 'value', 'section');
$app->params['settings'] = $settings;
// Add finish UrlRules
$app->getUrlManager()->addRules([

Loading…
Cancel
Save