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
607 B
29 lines
607 B
12 years ago
|
<?php
|
||
12 years ago
|
|
||
|
use yii\helpers\Inflector;
|
||
|
|
||
12 years ago
|
/**
|
||
12 years ago
|
* This is the template for generating a controller class file.
|
||
|
*
|
||
|
* @var yii\base\View $this
|
||
|
* @var yii\gii\generators\controller\Generator $generator
|
||
12 years ago
|
*/
|
||
12 years ago
|
|
||
|
echo "<?php\n";
|
||
12 years ago
|
?>
|
||
|
|
||
|
<?php if (!empty($generator->ns)): ?>
|
||
11 years ago
|
namespace <?= $generator->ns ?>;
|
||
12 years ago
|
<?php endif; ?>
|
||
|
|
||
11 years ago
|
class <?= $generator->getControllerClass() ?> extends <?= '\\' . trim($generator->baseClass, '\\') . "\n" ?>
|
||
12 years ago
|
{
|
||
|
<?php foreach($generator->getActionIDs() as $action): ?>
|
||
11 years ago
|
public function action<?= Inflector::id2camel($action) ?>()
|
||
12 years ago
|
{
|
||
11 years ago
|
return $this->render('<?= $action ?>');
|
||
12 years ago
|
}
|
||
|
|
||
|
<?php endforeach; ?>
|
||
|
}
|