'; foreach ($items as $item) { $menuItemForm = new MenuItemForm($item['item']); $html.=Yii::$app->getView()->render( '_item', [ 'item' => $item, 'model' => $menuItemForm, ] ); } return $html . ''; } $name_empty_error = Yii::t('menu', 'Name must be specified'); //$item_save_url = Url::to(['menu/save-menu-item-data']); $item_save_url = ''; // delete this $item_delete_url = Url::to(['menu/delete-menu-item']); $confirm_delete_message = Yii::t('buttons', 'Are you sure you want to delete this item?'); $current_url = Url::to(['menu/index', 'id' => $menu->id]); $js = <<registerJs($js, $this::POS_READY); $url = Url::to(['/menu/save-menu-items']); $redirect = Url::to(['menu/index', 'id' => $menu->id]); ?>

'btn btn-success pull-right', 'onclick' => new JsExpression('sendTree('.$menu->id.', "'.$url.'", "'.$redirect.'")'), ]) ?>