Yii will use YiiBase :: getPathOfAlias ββ() to do this, which translates the alias to its corresponding path.
Yii predefines these aliases
system: refers to the Yii framework directory; zii: refers to the Zii library directory; application: refers to the application base directory; webroot: refers to the directory containing the entry script file. ext: refers to the directory containing all third-party extensions.
So using
$ imagePath = YiiBase :: getPathOfAlias ββ("webroot"). '/ images';
will provide you with the required results.
source share