diff options
Diffstat (limited to 'framework/gii/generators/module/templates/default')
7 files changed, 52 insertions, 0 deletions
diff --git a/framework/gii/generators/module/templates/default/components/.yii b/framework/gii/generators/module/templates/default/components/.yii new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/framework/gii/generators/module/templates/default/components/.yii diff --git a/framework/gii/generators/module/templates/default/controllers/DefaultController.php b/framework/gii/generators/module/templates/default/controllers/DefaultController.php new file mode 100644 index 0000000..1936819 --- /dev/null +++ b/framework/gii/generators/module/templates/default/controllers/DefaultController.php @@ -0,0 +1,9 @@ +<?php echo "<?php\n"; ?> + +class DefaultController extends Controller +{ + public function actionIndex() + { + $this->render('index'); + } +}
\ No newline at end of file diff --git a/framework/gii/generators/module/templates/default/messages/.yii b/framework/gii/generators/module/templates/default/messages/.yii new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/framework/gii/generators/module/templates/default/messages/.yii diff --git a/framework/gii/generators/module/templates/default/models/.yii b/framework/gii/generators/module/templates/default/models/.yii new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/framework/gii/generators/module/templates/default/models/.yii diff --git a/framework/gii/generators/module/templates/default/module.php b/framework/gii/generators/module/templates/default/module.php new file mode 100644 index 0000000..b0d98d0 --- /dev/null +++ b/framework/gii/generators/module/templates/default/module.php @@ -0,0 +1,28 @@ +<?php echo "<?php\n"; ?> + +class <?php echo $this->moduleClass; ?> extends CWebModule +{ + public function init() + { + // this method is called when the module is being created + // you may place code here to customize the module or the application + + // import the module-level models and components + $this->setImport(array( + '<?php echo $this->moduleID; ?>.models.*', + '<?php echo $this->moduleID; ?>.components.*', + )); + } + + public function beforeControllerAction($controller, $action) + { + if(parent::beforeControllerAction($controller, $action)) + { + // this method is called before any module controller action is performed + // you may place customized code here + return true; + } + else + return false; + } +} diff --git a/framework/gii/generators/module/templates/default/views/default/index.php b/framework/gii/generators/module/templates/default/views/default/index.php new file mode 100644 index 0000000..3ee8a6e --- /dev/null +++ b/framework/gii/generators/module/templates/default/views/default/index.php @@ -0,0 +1,15 @@ +<?php echo "<?php\n"; ?> +$this->breadcrumbs=array( + $this->module->id, +); +?> +<h1><?php echo "<?php"; ?> echo $this->uniqueId . '/' . $this->action->id; ?></h1> + +<p> +This is the view content for action "<?php echo "<?php"; ?> echo $this->action->id; ?>". +The action belongs to the controller "<?php echo "<?php"; ?> echo get_class($this); ?>" +in the "<?php echo "<?php"; ?> echo $this->module->id; ?>" module. +</p> +<p> +You may customize this page by editing <tt><?php echo "<?php"; ?> echo __FILE__; ?></tt> +</p>
\ No newline at end of file diff --git a/framework/gii/generators/module/templates/default/views/layouts/.yii b/framework/gii/generators/module/templates/default/views/layouts/.yii new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/framework/gii/generators/module/templates/default/views/layouts/.yii |
