Skip to content
This repository has been archived by the owner on Jan 10, 2022. It is now read-only.

Commit

Permalink
Added controller and actions references in doc blocks fro view files …
Browse files Browse the repository at this point in the history
…generated by Gii 'CRUD' generator
  • Loading branch information
klimov-paul committed Aug 2, 2017
1 parent a25f606 commit c6220c9
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Yii 2 Admin pack extension Change Log
=====================================

1.0.2 under development
-----------------------

- Enh #15: Added controller and actions references in doc blocks fro view files generated by Gii 'CRUD' generator (naffiq, klimov-paul)


1.0.1, April 19, 2017
---------------------

Expand Down
10 changes: 7 additions & 3 deletions gii/crud/default/views/_form.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<?php

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

/* @var $this yii\web\View */
/* @var $generator yii2tech\admin\gii\crud\Generator */

Expand All @@ -15,6 +12,13 @@

echo "<?php\n";
?>
/**
* @see <?= $generator->controllerClass . "\n" ?>
<?php if (is_subclass_of($generator->controllerClass, 'yii2tech\admin\CrudController')): ?>
* @see yii2tech\admin\actions\Create
* @see yii2tech\admin\actions\Update
<?php endif ?>
*/

use yii\bootstrap\Html;
use yii\bootstrap\ActiveForm;
Expand Down
7 changes: 6 additions & 1 deletion gii/crud/default/views/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@

echo "<?php\n";
?>
/**
* @see <?= $generator->controllerClass . "\n" ?>
<?php if (is_subclass_of($generator->controllerClass, 'yii2tech\admin\CrudController')): ?>
* @see yii2tech\admin\actions\Create
<?php endif ?>
*/

/* @var $this yii\web\View */
/* @var $model <?= ltrim($generator->modelClass, '\\') ?> */
Expand All @@ -36,4 +42,3 @@
<?= "<?= " ?>$this->render('_form', [
'model' => $model,
]) ?>

6 changes: 6 additions & 0 deletions gii/crud/default/views/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@

echo "<?php\n";
?>
/**
* @see <?= $generator->controllerClass . "\n" ?>
<?php if (is_subclass_of($generator->controllerClass, 'yii2tech\admin\CrudController')): ?>
* @see yii2tech\admin\actions\Index
<?php endif ?>
*/

<?php if ($generator->indexWidgetType === 'grid'): ?>
use yii\grid\GridView;
Expand Down
8 changes: 6 additions & 2 deletions gii/crud/default/views/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@

echo "<?php\n";
?>
/**
* @see <?= $generator->controllerClass . "\n" ?>
<?php if (is_subclass_of($generator->controllerClass, 'yii2tech\admin\CrudController')): ?>
* @see yii2tech\admin\actions\Update
<?php endif ?>
*/

/* @var $this yii\web\View */
/* @var $model <?= ltrim($generator->modelClass, '\\') ?> */
Expand Down Expand Up @@ -39,5 +45,3 @@
<?= "<?= " ?>$this->render('_form', [
'model' => $model,
]) ?>


6 changes: 6 additions & 0 deletions gii/crud/default/views/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@

echo "<?php\n";
?>
/**
* @see <?= $generator->controllerClass . "\n" ?>
<?php if (is_subclass_of($generator->controllerClass, 'yii2tech\admin\CrudController')): ?>
* @see yii2tech\admin\actions\View
<?php endif ?>
*/

use yii\bootstrap\Html;
use yii\widgets\DetailView;
Expand Down

0 comments on commit c6220c9

Please sign in to comment.