generator.php 877 Bytes
Newer Older
Qiang Xue committed
1 2 3 4
<?php
use yii\helpers\Html;

/**
slavcodev committed
5 6 7 8
 * @var \yii\web\View $this
 * @var \yii\gii\Generator[] $generators
 * @var \yii\gii\Generator $activeGenerator
 * @var string $content
Qiang Xue committed
9 10 11 12 13 14
 */
$generators = Yii::$app->controller->module->generators;
$activeGenerator = Yii::$app->controller->generator;
?>
<?php $this->beginContent('@yii/gii/views/layouts/main.php'); ?>
<div class="row">
15
	<div class="col-md-3 col-sm-4">
Qiang Xue committed
16 17 18 19
		<div class="list-group">
			<?php
			foreach ($generators as $id => $generator) {
				$label = '<i class="glyphicon glyphicon-chevron-right"></i>' . Html::encode($generator->getName());
Alexander Makarov committed
20
				echo Html::a($label, ['default/view', 'id' => $id], [
Qiang Xue committed
21
					'class' => $generator === $activeGenerator ? 'list-group-item active' : 'list-group-item',
Alexander Makarov committed
22
				]);
Qiang Xue committed
23 24 25 26
			}
			?>
		</div>
	</div>
27
	<div class="col-md-9 col-sm-8">
Alexander Makarov committed
28
		<?= $content ?>
Qiang Xue committed
29 30 31
	</div>
</div>
<?php $this->endContent(); ?>