Answer the question
In order to leave comments, you need to log in
Question yii'stam, well, symphonists, too, take a look?
Sorry for not being so informative. I just don't know how to phrase the question.
In general, the theme is I sat, so I thought I thought. I do not like any Yii::$app->params['site_title']
arrays for settings. It's dull and tedious to prescribe this all the time in templates. I cut down my settings with harlots in short. Through the class, well, I connected it through the components. It turned out to be an even more depressing sight: Yii::$app->settings->get('site_title');
Here. Let's get to the heart of the matter. What if we inject this object with settings into the View object? Well, like that in the template was $this->settings->get('site_title');
. Isn't it normal? What are the pitfalls? Or basically idea mr.? What will the symphonists say about this, it's very interesting how they deal with such situations (when a global config is needed)? Or maybe it's better to make a static class.
Answer the question
In order to leave comments, you need to log in
I don't like any Yii::$app->params['site_title'] arrays for settings.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question