This article shows one of possible ways to implement menu items (as well as links), which displays a progress / wait dialog and are redirecting browser to destination URL in the same time. This is especially useful, for links or routes that are know to be loaded for a prolonged period of time (i.e. getting a lot of data from database).
It is difficult to perform user dependent theming through a general configuration in 'main.php'.
This article proposes a method to do so through a Factory that dynamically generates classes to allow delayed resolution of actual user values.
This means that you can refer to values that are stored in the database through the CActiveRecord before Yii is actually loaded.
The values will be fetched from the database when actually used for the first time, which is after Yii is loaded.
Actually, you can use pretty much any method that relies on Yii with this method.