From bcfb1eaf2e5830ede9d6d479d6cb26e43bc1159e Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Thu, 21 Nov 2013 00:34:32 +0100 Subject: [PATCH] updated application guide and index --- docs/guide/apps-advanced.md | 11 ++++++----- docs/guide/apps-basic.md | 17 ++++++++++------- docs/guide/extension.md | 4 ---- docs/guide/extensions.md | 4 ++++ docs/guide/index.md | 7 ++++--- 5 files changed, 24 insertions(+), 19 deletions(-) delete mode 100644 docs/guide/extension.md create mode 100644 docs/guide/extensions.md diff --git a/docs/guide/apps-advanced.md b/docs/guide/apps-advanced.md index 9669217..890b1e9 100644 --- a/docs/guide/apps-advanced.md +++ b/docs/guide/apps-advanced.md @@ -121,7 +121,7 @@ Configuring Composer After application template is installed it's a good idea to adjust default `composer.json` that can be found in the root directory: -```javascript +```json { "name": "yiisoft/yii2-app-advanced", "description": "Yii 2 Advanced Application Template", @@ -140,7 +140,10 @@ directory: "require": { "php": ">=5.4.0", "yiisoft/yii2": "dev-master", - "yiisoft/yii2-composer": "dev-master" + "yiisoft/yii2-swiftmailer": "dev-master", + "yiisoft/yii2-bootstrap": "dev-master", + "yiisoft/yii2-debug": "dev-master", + "yiisoft/yii2-gii": "dev-master" }, "scripts": { "post-create-project-cmd": [ @@ -160,15 +163,13 @@ directory: ] } } - ``` First we're updating basic information. Change `name`, `description`, `keywords`, `homepage` and `support` to match your project. Now the interesting part. You can add more packages your application needs to `require` section. -For example, to use markdown helper you need to add `michelf/php-markdown`. All these packages are coming from -[packagist.org](https://packagist.org/) so feel free to browse the website for useful code. +All these packages are coming from [packagist.org](https://packagist.org/) so feel free to browse the website for useful code. After your `composer.json` is changed you can run `php composer.phar update`, wait till packages are downloaded and installed and then just use them. Autoloading of classes will be handled automatically. diff --git a/docs/guide/apps-basic.md b/docs/guide/apps-basic.md index 386c202..a6c5ed1 100644 --- a/docs/guide/apps-basic.md +++ b/docs/guide/apps-basic.md @@ -30,6 +30,9 @@ Directory structure The basic application does not divide application directories much. Here's the basic structure: +- `assets` - application asset files. + - `AppAsset.php` - definition of application assets such as CSS, JavaScript etc. Check [Managing assets](assets.md) for + details. - `commands` - console controllers. - `config` - configuration. - `controllers` - web controllers. @@ -56,14 +59,12 @@ code repository, add it there. This directory contains configuration files: -- `AppAsset.php` - definition of application assets such as CSS, JavaScript etc. Check [Managing assets](assets.md) for - details. - `console.php` - console application configuration. - `params.php` - common application parameters. - `web.php` - web application configuration. - `web-test.php` - web application configuration used when running functional tests. -All these files except `AppAsset.php` are returning arrays used to configure corresponding application properties. Check +All these files are returning arrays used to configure corresponding application properties. Check [Configuration](configuration.md) guide section for details. ### views @@ -111,7 +112,7 @@ Configuring Composer After application template is installed it's a good idea to adjust default `composer.json` that can be found in the root directory: -```javascript +```json { "name": "yiisoft/yii2-app-basic", "description": "Yii 2 Basic Application Template", @@ -130,7 +131,10 @@ directory: "require": { "php": ">=5.4.0", "yiisoft/yii2": "dev-master", - "yiisoft/yii2-composer": "dev-master" + "yiisoft/yii2-swiftmailer": "dev-master", + "yiisoft/yii2-bootstrap": "dev-master", + "yiisoft/yii2-debug": "dev-master", + "yiisoft/yii2-gii": "dev-master" }, "scripts": { "post-create-project-cmd": [ @@ -153,8 +157,7 @@ First we're updating basic information. Change `name`, `description`, `keywords` your project. Now the interesting part. You can add more packages your application needs to `require` section. -For example, to use markdown helper you need to add `michelf/php-markdown`. All these packages are coming from -[packagist.org](https://packagist.org/) so feel free to browse the website for useful code. +All these packages are coming from [packagist.org](https://packagist.org/) so feel free to browse the website for useful code. After your `composer.json` is changed you can run `php composer.phar update`, wait till packages are downloaded and installed and then just use them. Autoloading of classes will be handled automatically. diff --git a/docs/guide/extension.md b/docs/guide/extension.md deleted file mode 100644 index 2fcea72..0000000 --- a/docs/guide/extension.md +++ /dev/null @@ -1,4 +0,0 @@ -Extending Yii -============= - -TDB \ No newline at end of file diff --git a/docs/guide/extensions.md b/docs/guide/extensions.md new file mode 100644 index 0000000..2fcea72 --- /dev/null +++ b/docs/guide/extensions.md @@ -0,0 +1,4 @@ +Extending Yii +============= + +TDB \ No newline at end of file diff --git a/docs/guide/index.md b/docs/guide/index.md index 4962566..91c4210 100644 --- a/docs/guide/index.md +++ b/docs/guide/index.md @@ -18,7 +18,7 @@ Getting started Base concepts ============= -- [Basic concepts of Yii] - The Object and Component class, Path aliases and autoloading +- [Basic concepts of Yii](basics.md) - The Object and Component class, Path aliases and autoloading - [MVC](mvc.md) - Implementation of MVC in Yii and a typical MVC application flow - [Model](model.md) - The Yii Model provides Attributes, Scenarios and data Validation - [View](view.md) - Rendering Views applying layouts, using Widgets and asset management @@ -46,13 +46,13 @@ Extensions and 3rd party libraries ================================== - [Composer](composer.md) - How to manage applications dependencies via composer -- [Extending Yii](extension.md) +- [Extending Yii](extensions.md) - [Template engines](template.md) - Using template engines such as Smary or Twig Security and access control =========================== -- [Authentication](authentication.md) - Identifying User +- [Authentication](authentication.md) - Identifying Users - [Authorization](authorization.md) - Access control and RBAC - [Security](security.md) - Hashing and verifying passwords, encryption - [Views security](view.md#security) - how to prevent XSS @@ -69,6 +69,7 @@ Data providers, lists and grids Advanced Topics =============== +- [Asset Management](assets.md) - [Working with forms](form.md) - [Bootstrap widgets](bootstrap-widgets.md) - Using [twitter bootstrap](http://getbootstrap.com/) - [Theming](theming.md)