Yii2 Bootstrap 3
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

12 years ago
<?php
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
*/
echo "<?php\n";
12 years ago
?>
<?php if (!empty($generator->ns)): ?>
namespace <?= $generator->ns ?>;
12 years ago
<?php endif; ?>
class <?= $generator->getControllerClass() ?> extends <?= '\\' . trim($generator->baseClass, '\\') . "\n" ?>
12 years ago
{
<?php foreach($generator->getActionIDs() as $action): ?>
public function action<?= Inflector::id2camel($action) ?>()
12 years ago
{
return $this->render('<?= $action ?>');
12 years ago
}
<?php endforeach; ?>
}