refactored gii.

This commit is contained in:
qiang.xue
2010-04-07 00:41:20 +00:00
parent db6ac30107
commit 36bd0c8b69
12 changed files with 67 additions and 70 deletions

View File

@@ -20,6 +20,28 @@ class ModuleCode extends CCodeModel
));
}
public function successMessage()
{
if(Yii::app()->hasModule($this->moduleID))
return 'The module has been generated successfully. You may '.CHtml::link('try it now', Yii::app()->createUrl($this->moduleID), array('target'=>'_blank')).'.';
$output=<<<EOD
<p>The module has been generated successfully.</p>
<p>To access the module, you need to modify the application configuration as follows:</p>
EOD;
$code=<<<EOD
<?php
return array(
'modules'=>array(
'{$this->moduleID}',
),
......
);
EOD;
return $output.highlight_string($code,true);
}
public function prepare()
{
$this->files=array();