Yii2 framework backup
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

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