Код: Выделить всё
$user = new User ( );
// соответвенно в виде
echo CHtml::activeLabel ( $user, name );
Код: Выделить всё
$user = $this->loadUser ();
Код: Выделить всё
User::model()->with( 'profile')->findByPk($userId);
// в виде
echo CHtml::activeLabel ( $user->profile, 'photo' );
Код: Выделить всё
$user = new User ( )->with( 'profile');
Спасибо