create.php 937 Bytes
Newer Older
Qiang Xue committed
1
<?php
Qiang Xue committed
2 3 4 5

use yii\helpers\Inflector;
use yii\helpers\StringHelper;

6 7
/* @var $this yii\web\View */
/* @var $generator yii\gii\generators\crud\Generator */
Qiang Xue committed
8

Qiang Xue committed
9
echo "<?php\n";
Qiang Xue committed
10 11
?>

Qiang Xue committed
12 13
use yii\helpers\Html;

14 15 16

/* @var $this yii\web\View */
/* @var $model <?= ltrim($generator->modelClass, '\\') ?> */
Qiang Xue committed
17

18 19
$this->title = <?= $generator->generateString('Create {modelClass}', ['modelClass' => Inflector::camel2words(StringHelper::basename($generator->modelClass))]) ?>;
$this->params['breadcrumbs'][] = ['label' => <?= $generator->generateString(Inflector::pluralize(Inflector::camel2words(StringHelper::basename($generator->modelClass)))) ?>, 'url' => ['index']];
Qiang Xue committed
20
$this->params['breadcrumbs'][] = $this->title;
Qiang Xue committed
21
?>
Alexander Makarov committed
22
<div class="<?= Inflector::camel2id(StringHelper::basename($generator->modelClass)) ?>-create">
Qiang Xue committed
23

24
    <h1><?= "<?= " ?>Html::encode($this->title) ?></h1>
Qiang Xue committed
25

26 27 28
    <?= "<?= " ?>$this->render('_form', [
        'model' => $model,
    ]) ?>
Qiang Xue committed
29

Qiang Xue committed
30
</div>