You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
606 B
29 lines
606 B
11 years ago
|
<?php
|
||
11 years ago
|
|
||
|
use yii\helpers\Inflector;
|
||
|
|
||
11 years ago
|
/**
|
||
11 years ago
|
* This is the template for generating a controller class file.
|
||
|
*
|
||
11 years ago
|
* @var yii\web\View $this
|
||
11 years ago
|
* @var yii\gii\generators\controller\Generator $generator
|
||
11 years ago
|
*/
|
||
11 years ago
|
|
||
|
echo "<?php\n";
|
||
11 years ago
|
?>
|
||
|
|
||
|
<?php if (!empty($generator->ns)): ?>
|
||
11 years ago
|
namespace <?= $generator->ns ?>;
|
||
11 years ago
|
<?php endif; ?>
|
||
|
|
||
11 years ago
|
class <?= $generator->getControllerClass() ?> extends <?= '\\' . trim($generator->baseClass, '\\') . "\n" ?>
|
||
11 years ago
|
{
|
||
|
<?php foreach($generator->getActionIDs() as $action): ?>
|
||
11 years ago
|
public function action<?= Inflector::id2camel($action) ?>()
|
||
11 years ago
|
{
|
||
11 years ago
|
return $this->render('<?= $action ?>');
|
||
11 years ago
|
}
|
||
|
|
||
|
<?php endforeach; ?>
|
||
|
}
|