Answer the question
In order to leave comments, you need to log in
How to check template version?
Good afternoon, I am writing an extension for Yii2, I really want to make it universal, for all universal versions of templates. Tell me how you can accurately check which version of the template is deployed by the user in the basic or advanced application?
And if I have advansed, can I somehow access the settings of each application through Yii::$app: frontand, backand, console, common?
Answer the question
In order to leave comments, you need to log in
And what will you do if the user of your extension does not use standard templates? If I'm not mistaken, Yii allows you to organize folders however you like. For example, the same Easyii uses its own template, taking the contents of the web folder to the root.
What difference does it make what version of the template? a template is just a blank of the project, some way of organizing it and nothing more. The template can be not only basic or advanced, but also some kind of custom one. If your extension depends on the template type, this is no longer correct and not universal. Therefore, it’s better to think about how to make it without being tied to a specific template, or create a corresponding question on the toaster
I want to make it universal, for all universal versions of templates
Yii::$app->components
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question