diff --git a/Pace.php b/Pace.php index 4109a9a..d54b742 100644 --- a/Pace.php +++ b/Pace.php @@ -40,11 +40,13 @@ public function run() }elseif ($this->color === null){ $this->color = 'blue'; } + if(isset(Yii::$app->params['paceOptions']['theme']) && !empty(Yii::$app->params['paceOptions']['theme']) && $this->theme === null) { $this->theme = Yii::$app->params['paceOptions']['theme']; - }elseif ($this->color === null){ + }elseif ($this->theme === null){ $this->theme = 'minimal'; } + if(isset(Yii::$app->params['paceOptions']['options']) && !empty(Yii::$app->params['paceOptions']['options']) && $this->options === null) { $this->getView()->registerJs('window.paceOptions=' . json_encode(Yii::$app->params['paceOptions']['options']), \yii\web\View::POS_BEGIN); }