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

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

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

Qiang Xue committed
11
echo "<?php\n";
Qiang Xue committed
12 13
?>

Qiang Xue committed
14 15 16 17 18 19 20 21
use yii\helpers\Html;

/**
 * @var yii\base\View $this
 * @var <?php echo ltrim($generator->modelClass, '\\'); ?> $model
 */

$this->title = 'Create <?php echo Inflector::camel2words(StringHelper::basename($generator->modelClass)); ?>';
Qiang Xue committed
22 23
$this->params['breadcrumbs'][] = array('label' => '<?php echo Inflector::pluralize(Inflector::camel2words(StringHelper::basename($generator->modelClass))); ?>', 'url' => array('index'));
$this->params['breadcrumbs'][] = $this->title;
Qiang Xue committed
24
?>
Qiang Xue committed
25 26 27
<div class="<?php echo Inflector::camel2id(StringHelper::basename($generator->modelClass)); ?>-create">

	<h1><?php echo "<?php"; ?> echo Html::encode($this->title); ?></h1>
Qiang Xue committed
28

Qiang Xue committed
29 30 31
	<?php echo "<?php"; ?> echo $this->render('_form', array(
		'model' => $model,
	)); ?>
Qiang Xue committed
32

Qiang Xue committed
33
</div>