Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
bcfb1eaf
Commit
bcfb1eaf
authored
Nov 21, 2013
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated application guide and index
parent
d7758146
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
15 deletions
+20
-15
apps-advanced.md
docs/guide/apps-advanced.md
+6
-5
apps-basic.md
docs/guide/apps-basic.md
+10
-7
extensions.md
docs/guide/extensions.md
+0
-0
index.md
docs/guide/index.md
+4
-3
No files found.
docs/guide/apps-advanced.md
View file @
bcfb1eaf
...
...
@@ -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:
```
j
avascript
```
j
son
{
"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.
docs/guide/apps-basic.md
View file @
bcfb1eaf
...
...
@@ -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:
```
j
avascript
```
j
son
{
"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.
docs/guide/extension.md
→
docs/guide/extension
s
.md
View file @
bcfb1eaf
File moved
docs/guide/index.md
View file @
bcfb1eaf
...
...
@@ -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
](
extension
s
.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 User
s
-
[
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment