Commit 00cfe93b by Qiang Xue

Finished console Gii feature.

parent 443779d6
...@@ -14,6 +14,7 @@ Yii Framework 2 gii extension Change Log ...@@ -14,6 +14,7 @@ Yii Framework 2 gii extension Change Log
- Enh #3088: The gii module will manage their own URL rules now (qiangxue) - Enh #3088: The gii module will manage their own URL rules now (qiangxue)
- Enh #3222: Added `useTablePrefix` option to the model generator for Gii (horizons2) - Enh #3222: Added `useTablePrefix` option to the model generator for Gii (horizons2)
- Enh #3811: Now Gii model generator makes autocomplete for model class field (mitalcoi) - Enh #3811: Now Gii model generator makes autocomplete for model class field (mitalcoi)
- New #1280: Gii can now be run from command line (schmunk42, cebe, qiangxue)
2.0.0-beta April 13, 2014 2.0.0-beta April 13, 2014
......
...@@ -280,6 +280,7 @@ Yii Framework 2 Change Log ...@@ -280,6 +280,7 @@ Yii Framework 2 Change Log
- Chg: `yii\web\Request::cookieValidationKey` must be explicitly specified for each application that wants to use cookie validation (qiangxue) - Chg: `yii\web\Request::cookieValidationKey` must be explicitly specified for each application that wants to use cookie validation (qiangxue)
- Chg: Added `yii\composer\Installer::postCreateProject()` and modified the syntax of calling installer methods in composer.json (qiangxue) - Chg: Added `yii\composer\Installer::postCreateProject()` and modified the syntax of calling installer methods in composer.json (qiangxue)
- Chg: When an ID is found to be in both `Application::controllerMap` and `Application::modules`, the former will take precedence (qiangxue) - Chg: When an ID is found to be in both `Application::controllerMap` and `Application::modules`, the former will take precedence (qiangxue)
- New #1280: Gii can now be run from command line (schmunk42, cebe, qiangxue)
- New #3911: Added `yii\behaviors\SluggableBehavior` that fills the specified model attribute with the transliterated and adjusted version to use in URLs (creocoder) - New #3911: Added `yii\behaviors\SluggableBehavior` that fills the specified model attribute with the transliterated and adjusted version to use in URLs (creocoder)
- New #4193: Added `yii\filters\Cors` CORS filter to allow Cross Origin Resource Sharing (pgaultier) - New #4193: Added `yii\filters\Cors` CORS filter to allow Cross Origin Resource Sharing (pgaultier)
- New #4945: Added `yii\test\ArrayFixture` (Ragazzo) - New #4945: Added `yii\test\ArrayFixture` (Ragazzo)
......
...@@ -327,8 +327,11 @@ class HelpController extends Controller ...@@ -327,8 +327,11 @@ class HelpController extends Controller
*/ */
protected function formatOptionHelp($name, $required, $type, $defaultValue, $comment) protected function formatOptionHelp($name, $required, $type, $defaultValue, $comment)
{ {
$doc = '';
$comment = trim($comment); $comment = trim($comment);
$type = trim($type);
if (strncmp($type, 'bool', 4) === 0) {
$type = 'boolean, 0 or 1';
}
if ($defaultValue !== null && !is_array($defaultValue)) { if ($defaultValue !== null && !is_array($defaultValue)) {
if ($type === null) { if ($type === null) {
...@@ -344,10 +347,7 @@ class HelpController extends Controller ...@@ -344,10 +347,7 @@ class HelpController extends Controller
$defaultValue = var_export($defaultValue, true); $defaultValue = var_export($defaultValue, true);
} }
$doc = "$type (defaults to " . $defaultValue . ")"; $doc = "$type (defaults to " . $defaultValue . ")";
} elseif (trim($type) !== '') { } else {
if (strncmp($type, 'bool', 4) === 0) {
$type = 'boolean, 0 or 1';
}
$doc = $type; $doc = $type;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment