PHP Classes

File: views/test/create.php

Recommend this page to a friend!
  Classes of Uldis Nelsons   YII2 Framework PHP Init   views/test/create.php   Download  
File: views/test/create.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: 2 years ago
Size: 967 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', 'Create');
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Tests'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="giiant-crud test-create">

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

    <div class="clearfix crud-navigation">
        <div class="pull-left">
            <?= Html::a(
           
Yii::t('app', 'Cancel'),
            \
yii\helpers\Url::previous(),
            [
'class' => 'btn btn-default']) ?>
</div>
    </div>

    <hr />

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

</div>