PHP Classes

File: views/test/update.php

Recommend this page to a friend!
  Classes of Uldis Nelsons   YII2 Framework PHP Init   views/test/update.php   Download  
File: views/test/update.php
Role: Example script
Content type: text/plain
Description: Example script
Class: YII2 Framework PHP Init
Create a project based on the YII2 from template
Author: By
Last change:
Date: 3 years ago
Size: 1,080 bytes
 

Contents

Class file image Download
<?php

use yii\helpers\Html;

/**
* @var yii\web\View $this
* @var app\models\Test $model
* @var string $relAttributes relation fields names for disabling
*/
if(!isset($relAttributes)){
   
$relAttributes = false;
}

$this->title = Yii::t('app', 'Test') . $model->name . ', ' . Yii::t('app', 'Edit');
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Tests'), 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => (string)$model->name, 'url' => ['view', 'id' => $model->id]];
$this->params['breadcrumbs'][] = Yii::t('app', 'Edit');
?>
<div class="giiant-crud test-update">

    <h1>
        <?= Yii::t('app', 'Test') ?>
<small>
                        <?= $model->name ?> </small>
    </h1>

    <div class="crud-navigation">
        <?= Html::a('<span class="glyphicon glyphicon-eye-open"></span> ' . Yii::t('app', 'View'), ['view', 'id' => $model->id], ['class' => 'btn btn-default']) ?>
</div>

    <hr />

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

</div>