Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

index.php 998B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. use yii\helpers\Html;
  3. /* @var $this \yii\web\View */
  4. /* @var $generators \yii\gii\Generator[] */
  5. /* @var $content string */
  6. $generators = Yii::$app->controller->module->generators;
  7. $this->title = 'Welcome to Gii';
  8. ?>
  9. <div class="default-index">
  10. <div class="page-header">
  11. <h1>Welcome to Gii <small>a magical tool that can write code for you</small></h1>
  12. </div>
  13. <p class="lead">Start the fun with the following code generators:</p>
  14. <div class="row">
  15. <?php foreach ($generators as $id => $generator): ?>
  16. <div class="generator col-lg-4">
  17. <h3><?= Html::encode($generator->getName()) ?></h3>
  18. <p><?= $generator->getDescription() ?></p>
  19. <p><?= Html::a('Start &raquo;', ['default/view', 'id' => $id], ['class' => 'btn btn-default']) ?></p>
  20. </div>
  21. <?php endforeach; ?>
  22. </div>
  23. <p><a class="btn btn-success" href="http://www.yiiframework.com/extensions/?tag=gii">Get More Generators</a></p>
  24. </div>