diff --git a/framework/yii/debug/DebugAsset.php b/extensions/debug/DebugAsset.php similarity index 100% rename from framework/yii/debug/DebugAsset.php rename to extensions/debug/DebugAsset.php diff --git a/framework/yii/debug/LogTarget.php b/extensions/debug/LogTarget.php similarity index 100% rename from framework/yii/debug/LogTarget.php rename to extensions/debug/LogTarget.php diff --git a/framework/yii/debug/Module.php b/extensions/debug/Module.php similarity index 100% rename from framework/yii/debug/Module.php rename to extensions/debug/Module.php diff --git a/framework/yii/debug/Panel.php b/extensions/debug/Panel.php similarity index 100% rename from framework/yii/debug/Panel.php rename to extensions/debug/Panel.php diff --git a/extensions/debug/README.md b/extensions/debug/README.md new file mode 100644 index 0000000..aef2a03 --- /dev/null +++ b/extensions/debug/README.md @@ -0,0 +1,46 @@ +Debug Extension for Yii 2 +========================= + +This extension provides a debugger for Yii 2 applications. When this extension is used, +a debugger toolbar will appear at the bottom of every page. The extension also provides +a set of standalone pages to display more detailed debug information. + + +Installation +------------ + +The preferred way to install this extension is [composer](http://getcomposer.org/download/). + +Either run + +``` +php composer.phar require yiisoft/yii2-debug "*" +``` + +or add + +``` +"yiisoft/yii2-debug": "*" +``` + +to the require section of your `composer.json` file. + + +Usage +----- + +Once the extension is installed, simply modify your application configuration as follows: + +```php +return [ + 'preload' => ['debug'], + 'modules' => [ + 'debug' => 'yii\debug\Module', + ... + ], + ... +]; +``` + +You will see a debugger toolbar showing at the bottom of every page of your application. +You can click on the toolbar to see more detailed debug information. diff --git a/framework/yii/debug/assets/main.css b/extensions/debug/assets/main.css similarity index 100% rename from framework/yii/debug/assets/main.css rename to extensions/debug/assets/main.css diff --git a/extensions/debug/composer.json b/extensions/debug/composer.json new file mode 100644 index 0000000..716506d --- /dev/null +++ b/extensions/debug/composer.json @@ -0,0 +1,22 @@ +{ + "name": "yiisoft/yii2-debug", + "description": "The debugger extension for the Yii framework", + "keywords": ["yii", "debug", "debugger"], + "type": "yii2-extension", + "license": "BSD-3-Clause", + "support": { + "issues": "https://github.com/yiisoft/yii2/issues?state=open", + "forum": "http://www.yiiframework.com/forum/", + "wiki": "http://www.yiiframework.com/wiki/", + "irc": "irc://irc.freenode.net/yii", + "source": "https://github.com/yiisoft/yii2" + }, + "minimum-stability": "dev", + "require": { + "yiisoft/yii2": "*" + }, + "autoload": { + "psr-0": { "yii\\debug\\": "" } + }, + "target-dir": "yii/debug" +} diff --git a/framework/yii/debug/controllers/DefaultController.php b/extensions/debug/controllers/DefaultController.php similarity index 100% rename from framework/yii/debug/controllers/DefaultController.php rename to extensions/debug/controllers/DefaultController.php diff --git a/framework/yii/debug/panels/ConfigPanel.php b/extensions/debug/panels/ConfigPanel.php similarity index 100% rename from framework/yii/debug/panels/ConfigPanel.php rename to extensions/debug/panels/ConfigPanel.php diff --git a/framework/yii/debug/panels/DbPanel.php b/extensions/debug/panels/DbPanel.php similarity index 100% rename from framework/yii/debug/panels/DbPanel.php rename to extensions/debug/panels/DbPanel.php diff --git a/framework/yii/debug/panels/LogPanel.php b/extensions/debug/panels/LogPanel.php similarity index 100% rename from framework/yii/debug/panels/LogPanel.php rename to extensions/debug/panels/LogPanel.php diff --git a/framework/yii/debug/panels/ProfilingPanel.php b/extensions/debug/panels/ProfilingPanel.php similarity index 100% rename from framework/yii/debug/panels/ProfilingPanel.php rename to extensions/debug/panels/ProfilingPanel.php diff --git a/framework/yii/debug/panels/RequestPanel.php b/extensions/debug/panels/RequestPanel.php similarity index 100% rename from framework/yii/debug/panels/RequestPanel.php rename to extensions/debug/panels/RequestPanel.php diff --git a/framework/yii/debug/views/default/index.php b/extensions/debug/views/default/index.php similarity index 100% rename from framework/yii/debug/views/default/index.php rename to extensions/debug/views/default/index.php diff --git a/framework/yii/debug/views/default/toolbar.css b/extensions/debug/views/default/toolbar.css similarity index 100% rename from framework/yii/debug/views/default/toolbar.css rename to extensions/debug/views/default/toolbar.css diff --git a/framework/yii/debug/views/default/toolbar.js b/extensions/debug/views/default/toolbar.js similarity index 100% rename from framework/yii/debug/views/default/toolbar.js rename to extensions/debug/views/default/toolbar.js diff --git a/framework/yii/debug/views/default/toolbar.php b/extensions/debug/views/default/toolbar.php similarity index 100% rename from framework/yii/debug/views/default/toolbar.php rename to extensions/debug/views/default/toolbar.php diff --git a/framework/yii/debug/views/default/view.php b/extensions/debug/views/default/view.php similarity index 100% rename from framework/yii/debug/views/default/view.php rename to extensions/debug/views/default/view.php diff --git a/framework/yii/debug/views/layouts/main.php b/extensions/debug/views/layouts/main.php similarity index 100% rename from framework/yii/debug/views/layouts/main.php rename to extensions/debug/views/layouts/main.php diff --git a/framework/yii/gii/CodeFile.php b/extensions/gii/CodeFile.php similarity index 100% rename from framework/yii/gii/CodeFile.php rename to extensions/gii/CodeFile.php diff --git a/framework/yii/gii/Generator.php b/extensions/gii/Generator.php similarity index 100% rename from framework/yii/gii/Generator.php rename to extensions/gii/Generator.php diff --git a/framework/yii/gii/GiiAsset.php b/extensions/gii/GiiAsset.php similarity index 100% rename from framework/yii/gii/GiiAsset.php rename to extensions/gii/GiiAsset.php diff --git a/framework/yii/gii/Module.php b/extensions/gii/Module.php similarity index 100% rename from framework/yii/gii/Module.php rename to extensions/gii/Module.php diff --git a/extensions/gii/README.md b/extensions/gii/README.md new file mode 100644 index 0000000..d302746 --- /dev/null +++ b/extensions/gii/README.md @@ -0,0 +1,47 @@ +Gii Extension for Yii 2 +======================== + +This extension provides a Web-based code generator, called Gii, for Yii 2 applications. +You can use Gii to quickly generate models, forms, modules, CRUD, etc. + + +Installation +------------ + +The preferred way to install this extension is [composer](http://getcomposer.org/download/). + +Either run + +``` +php composer.phar require yiisoft/yii2-gii "*" +``` + +or add + +``` +"yiisoft/yii2-gii": "*" +``` + +to the require section of your `composer.json` file. + + +Usage +----- + +Once the extension is installed, simply modify your application configuration as follows: + +```php +return [ + 'modules' => [ + 'gii' => 'yii\gii\Module', + ... + ], + ... +]; +``` + +You can then access Gii through the following URL: + +``` +http://localhost/path/to/index.php?r=gii +``` diff --git a/framework/yii/gii/assets/gii.js b/extensions/gii/assets/gii.js similarity index 100% rename from framework/yii/gii/assets/gii.js rename to extensions/gii/assets/gii.js diff --git a/framework/yii/gii/assets/logo.png b/extensions/gii/assets/logo.png similarity index 100% rename from framework/yii/gii/assets/logo.png rename to extensions/gii/assets/logo.png diff --git a/framework/yii/gii/assets/main.css b/extensions/gii/assets/main.css similarity index 100% rename from framework/yii/gii/assets/main.css rename to extensions/gii/assets/main.css diff --git a/framework/yii/gii/assets/typeahead.js b/extensions/gii/assets/typeahead.js similarity index 100% rename from framework/yii/gii/assets/typeahead.js rename to extensions/gii/assets/typeahead.js diff --git a/framework/yii/gii/assets/typeahead.js-bootstrap.css b/extensions/gii/assets/typeahead.js-bootstrap.css similarity index 100% rename from framework/yii/gii/assets/typeahead.js-bootstrap.css rename to extensions/gii/assets/typeahead.js-bootstrap.css diff --git a/framework/yii/gii/components/ActiveField.php b/extensions/gii/components/ActiveField.php similarity index 100% rename from framework/yii/gii/components/ActiveField.php rename to extensions/gii/components/ActiveField.php diff --git a/extensions/gii/composer.json b/extensions/gii/composer.json new file mode 100644 index 0000000..5aa1348 --- /dev/null +++ b/extensions/gii/composer.json @@ -0,0 +1,22 @@ +{ + "name": "yiisoft/yii2-gii", + "description": "The Gii extension for the Yii framework", + "keywords": ["yii", "gii", "code generator"], + "type": "yii2-extension", + "license": "BSD-3-Clause", + "support": { + "issues": "https://github.com/yiisoft/yii2/issues?state=open", + "forum": "http://www.yiiframework.com/forum/", + "wiki": "http://www.yiiframework.com/wiki/", + "irc": "irc://irc.freenode.net/yii", + "source": "https://github.com/yiisoft/yii2" + }, + "minimum-stability": "dev", + "require": { + "yiisoft/yii2": "*" + }, + "autoload": { + "psr-0": { "yii\\gii\\": "" } + }, + "target-dir": "yii/gii" +} diff --git a/framework/yii/gii/controllers/DefaultController.php b/extensions/gii/controllers/DefaultController.php similarity index 100% rename from framework/yii/gii/controllers/DefaultController.php rename to extensions/gii/controllers/DefaultController.php diff --git a/framework/yii/gii/generators/controller/Generator.php b/extensions/gii/generators/controller/Generator.php similarity index 100% rename from framework/yii/gii/generators/controller/Generator.php rename to extensions/gii/generators/controller/Generator.php diff --git a/framework/yii/gii/generators/controller/form.php b/extensions/gii/generators/controller/form.php similarity index 100% rename from framework/yii/gii/generators/controller/form.php rename to extensions/gii/generators/controller/form.php diff --git a/framework/yii/gii/generators/controller/templates/controller.php b/extensions/gii/generators/controller/templates/controller.php similarity index 100% rename from framework/yii/gii/generators/controller/templates/controller.php rename to extensions/gii/generators/controller/templates/controller.php diff --git a/framework/yii/gii/generators/controller/templates/view.php b/extensions/gii/generators/controller/templates/view.php similarity index 100% rename from framework/yii/gii/generators/controller/templates/view.php rename to extensions/gii/generators/controller/templates/view.php diff --git a/framework/yii/gii/generators/crud/Generator.php b/extensions/gii/generators/crud/Generator.php similarity index 100% rename from framework/yii/gii/generators/crud/Generator.php rename to extensions/gii/generators/crud/Generator.php diff --git a/framework/yii/gii/generators/crud/form.php b/extensions/gii/generators/crud/form.php similarity index 100% rename from framework/yii/gii/generators/crud/form.php rename to extensions/gii/generators/crud/form.php diff --git a/framework/yii/gii/generators/crud/templates/controller.php b/extensions/gii/generators/crud/templates/controller.php similarity index 100% rename from framework/yii/gii/generators/crud/templates/controller.php rename to extensions/gii/generators/crud/templates/controller.php diff --git a/framework/yii/gii/generators/crud/templates/search.php b/extensions/gii/generators/crud/templates/search.php similarity index 100% rename from framework/yii/gii/generators/crud/templates/search.php rename to extensions/gii/generators/crud/templates/search.php diff --git a/framework/yii/gii/generators/crud/templates/views/_form.php b/extensions/gii/generators/crud/templates/views/_form.php similarity index 100% rename from framework/yii/gii/generators/crud/templates/views/_form.php rename to extensions/gii/generators/crud/templates/views/_form.php diff --git a/framework/yii/gii/generators/crud/templates/views/_search.php b/extensions/gii/generators/crud/templates/views/_search.php similarity index 100% rename from framework/yii/gii/generators/crud/templates/views/_search.php rename to extensions/gii/generators/crud/templates/views/_search.php diff --git a/framework/yii/gii/generators/crud/templates/views/create.php b/extensions/gii/generators/crud/templates/views/create.php similarity index 100% rename from framework/yii/gii/generators/crud/templates/views/create.php rename to extensions/gii/generators/crud/templates/views/create.php diff --git a/framework/yii/gii/generators/crud/templates/views/index.php b/extensions/gii/generators/crud/templates/views/index.php similarity index 100% rename from framework/yii/gii/generators/crud/templates/views/index.php rename to extensions/gii/generators/crud/templates/views/index.php diff --git a/framework/yii/gii/generators/crud/templates/views/update.php b/extensions/gii/generators/crud/templates/views/update.php similarity index 100% rename from framework/yii/gii/generators/crud/templates/views/update.php rename to extensions/gii/generators/crud/templates/views/update.php diff --git a/framework/yii/gii/generators/crud/templates/views/view.php b/extensions/gii/generators/crud/templates/views/view.php similarity index 100% rename from framework/yii/gii/generators/crud/templates/views/view.php rename to extensions/gii/generators/crud/templates/views/view.php diff --git a/framework/yii/gii/generators/form/Generator.php b/extensions/gii/generators/form/Generator.php similarity index 100% rename from framework/yii/gii/generators/form/Generator.php rename to extensions/gii/generators/form/Generator.php diff --git a/framework/yii/gii/generators/form/form.php b/extensions/gii/generators/form/form.php similarity index 100% rename from framework/yii/gii/generators/form/form.php rename to extensions/gii/generators/form/form.php diff --git a/framework/yii/gii/generators/form/templates/action.php b/extensions/gii/generators/form/templates/action.php similarity index 100% rename from framework/yii/gii/generators/form/templates/action.php rename to extensions/gii/generators/form/templates/action.php diff --git a/framework/yii/gii/generators/form/templates/form.php b/extensions/gii/generators/form/templates/form.php similarity index 100% rename from framework/yii/gii/generators/form/templates/form.php rename to extensions/gii/generators/form/templates/form.php diff --git a/framework/yii/gii/generators/model/Generator.php b/extensions/gii/generators/model/Generator.php similarity index 100% rename from framework/yii/gii/generators/model/Generator.php rename to extensions/gii/generators/model/Generator.php diff --git a/framework/yii/gii/generators/model/form.php b/extensions/gii/generators/model/form.php similarity index 100% rename from framework/yii/gii/generators/model/form.php rename to extensions/gii/generators/model/form.php diff --git a/framework/yii/gii/generators/model/templates/model.php b/extensions/gii/generators/model/templates/model.php similarity index 100% rename from framework/yii/gii/generators/model/templates/model.php rename to extensions/gii/generators/model/templates/model.php diff --git a/framework/yii/gii/generators/module/Generator.php b/extensions/gii/generators/module/Generator.php similarity index 100% rename from framework/yii/gii/generators/module/Generator.php rename to extensions/gii/generators/module/Generator.php diff --git a/framework/yii/gii/generators/module/form.php b/extensions/gii/generators/module/form.php similarity index 100% rename from framework/yii/gii/generators/module/form.php rename to extensions/gii/generators/module/form.php diff --git a/framework/yii/gii/generators/module/templates/controller.php b/extensions/gii/generators/module/templates/controller.php similarity index 100% rename from framework/yii/gii/generators/module/templates/controller.php rename to extensions/gii/generators/module/templates/controller.php diff --git a/framework/yii/gii/generators/module/templates/module.php b/extensions/gii/generators/module/templates/module.php similarity index 100% rename from framework/yii/gii/generators/module/templates/module.php rename to extensions/gii/generators/module/templates/module.php diff --git a/framework/yii/gii/generators/module/templates/view.php b/extensions/gii/generators/module/templates/view.php similarity index 100% rename from framework/yii/gii/generators/module/templates/view.php rename to extensions/gii/generators/module/templates/view.php diff --git a/framework/yii/gii/views/default/diff.php b/extensions/gii/views/default/diff.php similarity index 100% rename from framework/yii/gii/views/default/diff.php rename to extensions/gii/views/default/diff.php diff --git a/framework/yii/gii/views/default/index.php b/extensions/gii/views/default/index.php similarity index 100% rename from framework/yii/gii/views/default/index.php rename to extensions/gii/views/default/index.php diff --git a/framework/yii/gii/views/default/view.php b/extensions/gii/views/default/view.php similarity index 100% rename from framework/yii/gii/views/default/view.php rename to extensions/gii/views/default/view.php diff --git a/framework/yii/gii/views/default/view/files.php b/extensions/gii/views/default/view/files.php similarity index 100% rename from framework/yii/gii/views/default/view/files.php rename to extensions/gii/views/default/view/files.php diff --git a/framework/yii/gii/views/default/view/results.php b/extensions/gii/views/default/view/results.php similarity index 100% rename from framework/yii/gii/views/default/view/results.php rename to extensions/gii/views/default/view/results.php diff --git a/framework/yii/gii/views/layouts/generator.php b/extensions/gii/views/layouts/generator.php similarity index 100% rename from framework/yii/gii/views/layouts/generator.php rename to extensions/gii/views/layouts/generator.php diff --git a/framework/yii/gii/views/layouts/main.php b/extensions/gii/views/layouts/main.php similarity index 100% rename from framework/yii/gii/views/layouts/main.php rename to extensions/gii/views/layouts/main.php