PHP Classes

File: views/backend/menu-item/index.php

Recommend this page to a friend!
  Classes of Gabriel Alejandro López López   Yii2 Website Module   views/backend/menu-item/index.php   Download  
File: views/backend/menu-item/index.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: 892 bytes
 

Contents

Class file image Download
<?php

use yii\helpers\Html;
use
backend\models\MenuItemSearch;
use
yii\data\ActiveDataProvider;
use
yii\web\View;
use
yii\widgets\ListView;
use
yii\helpers\Url;

/* @var $this View */
/* @var $searchModel MenuItemSearch */
/* @var $dataProvider ActiveDataProvider */

$website = Yii::$app->website;
$module = $this->context->module->id;

?>
<div class="menu-item-index">

    <p>
        <?= Html::a(Yii::t('website','New Item'), [
           
"/$module/menu-item/create",
           
'menu_id' => $menu->id,
           
'language' => $language,
        ])
?>
</p>

    <?= ListView::widget([
       
'dataProvider' => $dataProvider,
       
'layout' => Html::tag('ol', '{items}', [
               
'data-update-page' => Url::toRoute(['menu-item/update-position'])
            ]) .
"\n{pager}",
       
'itemView' => '_view',
       
'itemOptions' => ['tag' => false],
    ])
?>

</div>