Yii2.0.9的下拉菜单怎么做
2.0.9的源码是这样的,头像旁边的下拉菜单应该怎么做
if (Yii::$app->user->isGuest) { $rightMenus[] = ['label' => Yii::t('common', 'Signup'), 'url' => ['/site/signup']]; $rightMenus[] = ['label' => Yii::t('common', 'Login'), 'url' => ['/site/login']]; } else { $rightMenus[] = '<li>' . Html::beginForm(['/site/logout'], 'post') . Html::submitButton( '<img src="/images/acatar/small.jpg" alt="'.Yii::$app->user->identity->username.'" />', ['class' => 'btn btn-link'] ) . Html::endForm() . '</li>'; }