PHP Classes

File: views/backend/menu/update.php

Recommend this page to a friend!
  Classes of Gabriel Alejandro López López   Yii2 Website Module   views/backend/menu/update.php   Download  
File: views/backend/menu/update.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Yii2 Website Module
Add a content page management system to a site
Author: By
Last change:
Date: 1 month ago
Size: 963 bytes
 

Contents

Class file image Download
<?php

use yii\helpers\Html;

/* @var $this yii\web\View */
/* @var $model daxslab\website\models\Menu */

$this->title = Yii::t('website','Update Menu: ' . $model->name, [
   
'nameAttribute' => '' . $model->name,
]);
$this->params['breadcrumbs'][] = ['label' => Yii::t('website','Menus'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $model->name;
$module = $this->context->module->id;
?>
<div class="menu-update">

    <header class="mb-4 pb-2 border-bottom">
        <h1><?= $this->title ?></h1>
    </header>

    <?= $this->render('_form', [
       
'model' => $model,
    ])
?>

    <?= \yii\bootstrap4\Tabs::widget([
       
'items' => array_map(function ($item) use($model, $module) {
            return [
               
'label' => $item,
               
'content' => Yii::$app->runAction("/$module/menu-item/index", ['menu_id' => $model->id, 'language' => $item])
            ];
        },
$this->context->module->languages)
    ])
?>

</div>