Since the file may be located on the theme's or base view path, we need to find which of them is applied and then subtract it from the filename of the view. The array is sorted according to the Yii rules so just look through it from the beginning.