How to set custom path Alias via config main.php?

How to set custom path Alias via config main.php?

can I do it via config or I must use

Yii::setPathOfAlias ?

I’m not sure I understand your intention, but if you don’t want to use Yii::setPathOfAlias in the start script, you can add it before the return statement in the config file.

/Tommy

I want to find if I can just add the alias as configuration parameters to some component config…

like urlmanager style

But I think it’s impossible