Beispiel #1
0
?>

    <?php 
echo $form->field($model, 'w_id')->hiddenInput(['value' => $wechat->id])->label(false);
?>

    <?php 
echo $form->field($model, 'pid')->dropDownList(Menu::menusMap($wechat->id));
?>

    <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'type')->radioList(Menu::typeMap(), ['value' => 1]);
?>

    <?php 
echo $form->field($model, 'url')->textInput(['maxlength' => true]);
?>


	<div class="form-group">
        <div class="col-sm-offset-2 col-sm-3">
            <?php 
echo Html::submitButton('保 存', ['class' => 'btn btn-primary btn-block']);
?>
        </div>
    </div>
    
Beispiel #2
0
 /**
  * Lists all Menu models.
  * @return mixed
  */
 public function actionIndex()
 {
     $list = Menu::getWechatMenus($this->wid);
     return $this->render('index', ['menus' => $list, 'type' => Menu::typeMap()]);
 }