update.php 1.15 KB
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 12
$urlParams = $generator->generateUrlParams();

Qiang Xue committed
13
echo "<?php\n";
Qiang Xue committed
14 15
?>

Qiang Xue committed
16 17 18
use yii\helpers\Html;

/**
Qiang Xue committed
19 20 21
 * @var yii\base\View $this
 * @var <?php echo ltrim($generator->modelClass, '\\'); ?> $model
 */
Qiang Xue committed
22

Qiang Xue committed
23
$this->title = 'Update <?php echo Inflector::camel2words(StringHelper::basename($generator->modelClass)); ?>: ' . $model-><?php echo $generator->getNameAttribute(); ?>;
Qiang Xue committed
24 25 26
$this->params['breadcrumbs'][] = array('label' => '<?php echo Inflector::pluralize(Inflector::camel2words(StringHelper::basename($generator->modelClass))); ?>', 'url' => array('index'));
$this->params['breadcrumbs'][] = array('label' => $model-><?php echo $generator->getNameAttribute(); ?>, 'url' => array('view', <?php echo $urlParams; ?>));
$this->params['breadcrumbs'][] = 'Update';
Qiang Xue committed
27
?>
Qiang Xue committed
28 29 30
<div class="<?php echo Inflector::camel2id(StringHelper::basename($generator->modelClass)); ?>-update">

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

Qiang Xue committed
32 33 34
	<?php echo "<?php"; ?> echo $this->render('_form', array(
		'model' => $model,
	)); ?>
Qiang Xue committed
35

Qiang Xue committed
36
</div>