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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
5d780786
Commit
5d780786
authored
Nov 21, 2013
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
linked the upgrade section to guide articles
parent
e700ca0a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
4 deletions
+34
-4
basics.md
docs/guide/basics.md
+6
-0
upgrade-from-v1.md
docs/guide/upgrade-from-v1.md
+28
-4
No files found.
docs/guide/basics.md
View file @
5d780786
...
@@ -79,3 +79,8 @@ Autoloading
...
@@ -79,3 +79,8 @@ Autoloading
-----------
-----------
TBD
TBD
Helper classes
--------------
TDB
\ No newline at end of file
docs/guide/upgrade-from-v1.md
View file @
5d780786
...
@@ -29,6 +29,8 @@ If your class does not need the event or behavior feature, you should consider u
...
@@ -29,6 +29,8 @@ If your class does not need the event or behavior feature, you should consider u
`Object`
as the base class. This is usually the case for classes that represent basic
`Object`
as the base class. This is usually the case for classes that represent basic
data structures.
data structures.
More details about Object and component can be found in the
[
Basic concepts section
](
basics.md
)
.
Object Configuration
Object Configuration
--------------------
--------------------
...
@@ -72,7 +74,8 @@ $object = Yii::createObject([
...
@@ -72,7 +74,8 @@ $object = Yii::createObject([
],
$param1
,
$param2
);
],
$param1
,
$param2
);
```
```
More on configuration in
[
configuration
](
configuration.md
)
More on configuration can be found in the
[
Basic concepts section
](
basics.md
)
.
Events
Events
------
------
...
@@ -116,6 +119,9 @@ Event::on(ActiveRecord::className(), ActiveRecord::EVENT_AFTER_INSERT, function
...
@@ -116,6 +119,9 @@ Event::on(ActiveRecord::className(), ActiveRecord::EVENT_AFTER_INSERT, function
The code above defines a handler that will be triggered for every Active Record object's
`EVENT_AFTER_INSERT`
event.
The code above defines a handler that will be triggered for every Active Record object's
`EVENT_AFTER_INSERT`
event.
See
[
Event handling section
](
events.md
)
for more details.
Path Alias
Path Alias
----------
----------
...
@@ -132,6 +138,8 @@ a class like `yii\web\Request` can be autoloaded by Yii. If you use a third part
...
@@ -132,6 +138,8 @@ a class like `yii\web\Request` can be autoloaded by Yii. If you use a third part
such as Zend Framework, you may define a path alias
`@Zend`
which refers to its installation
such as Zend Framework, you may define a path alias
`@Zend`
which refers to its installation
directory and Yii will be able to autoload any class in this library.
directory and Yii will be able to autoload any class in this library.
More on path aliases can be found in the
[
Basic concepts section
](
basics.md
)
.
View
View
----
----
...
@@ -165,6 +173,8 @@ extension for your Smarty views, or `twig` for Twig views. You may also configur
...
@@ -165,6 +173,8 @@ extension for your Smarty views, or `twig` for Twig views. You may also configur
`View::renderers`
property to use other template engines. See
[
Using template engines
](
template.md
)
section
`View::renderers`
property to use other template engines. See
[
Using template engines
](
template.md
)
section
of the guide for more details.
of the guide for more details.
See
[
View section
](
view.md
)
for more details.
Models
Models
------
------
...
@@ -230,6 +240,7 @@ sending them out. You have to `echo` them explicitly, e.g., `echo $this->render(
...
@@ -230,6 +240,7 @@ sending them out. You have to `echo` them explicitly, e.g., `echo $this->render(
To learn more about Yii 2.0 controllers refer to
[
Controller
](
controller.md
)
section of the guide.
To learn more about Yii 2.0 controllers refer to
[
Controller
](
controller.md
)
section of the guide.
Widgets
Widgets
-------
-------
...
@@ -252,6 +263,8 @@ $form = \yii\widgets\ActiveForm::begin([
...
@@ -252,6 +263,8 @@ $form = \yii\widgets\ActiveForm::begin([
Previously in 1.1, you would have to enter the widget class names as strings via the
`beginWidget()`
,
Previously in 1.1, you would have to enter the widget class names as strings via the
`beginWidget()`
,
`endWidget()`
and
`widget()`
methods of
`CBaseController`
. The approach above gets better IDE support.
`endWidget()`
and
`widget()`
methods of
`CBaseController`
. The approach above gets better IDE support.
For more on widgets see the
[
View section
](
view.md#widgets
)
.
Themes
Themes
------
------
...
@@ -267,6 +280,8 @@ of the context of a controller or a widget.
...
@@ -267,6 +280,8 @@ of the context of a controller or a widget.
There is no more
`CThemeManager`
. Instead,
`theme`
is a configurable property of the "view"
There is no more
`CThemeManager`
. Instead,
`theme`
is a configurable property of the "view"
application component.
application component.
For more on themes see the
[
Theming section
](
theming.md
)
.
Console Applications
Console Applications
--------------------
--------------------
...
@@ -282,6 +297,8 @@ are treated as global options declared in `globalOptions()`.
...
@@ -282,6 +297,8 @@ are treated as global options declared in `globalOptions()`.
Yii 2.0 supports automatic generation of command help information from comment blocks.
Yii 2.0 supports automatic generation of command help information from comment blocks.
For more on console applications see the
[
Console section
](
console.md
)
.
I18N
I18N
----
----
...
@@ -290,7 +307,7 @@ Yii 2.0 removes date formatter and number formatter in favor of the PECL intl PH
...
@@ -290,7 +307,7 @@ Yii 2.0 removes date formatter and number formatter in favor of the PECL intl PH
Message translation is still supported, but managed via the "i18n" application component.
Message translation is still supported, but managed via the "i18n" application component.
The component manages a set of message sources, which allows you to use different message
The component manages a set of message sources, which allows you to use different message
sources based on message categories. For more information, see the class documentation for
`I18N`
.
sources based on message categories. For more information, see the class documentation for
[
I18N
](
i18n.md
)
.
Action Filters
Action Filters
...
@@ -315,6 +332,7 @@ public function behaviors()
...
@@ -315,6 +332,7 @@ public function behaviors()
}
}
```
```
For more on action filters see the
[
Controller section
](
controller.md#action-filters
)
.
Assets
Assets
...
@@ -329,7 +347,7 @@ By registering an asset bundle via `AssetBundle::register()`, you will be able t
...
@@ -329,7 +347,7 @@ By registering an asset bundle via `AssetBundle::register()`, you will be able t
the assets in that bundle accessible via Web, and the current page will automatically
the assets in that bundle accessible via Web, and the current page will automatically
contain the references to the JavaScript and CSS files specified in that bundle.
contain the references to the JavaScript and CSS files specified in that bundle.
To learn more about assets see the
[
asset manager documentation
](
assets.md
)
.
Static Helpers
Static Helpers
--------------
--------------
...
@@ -441,6 +459,8 @@ By default, ActiveRecord now only saves dirty attributes. In 1.1, all attributes
...
@@ -441,6 +459,8 @@ By default, ActiveRecord now only saves dirty attributes. In 1.1, all attributes
are saved to database when you call
`save()`
, regardless of having changed or not,
are saved to database when you call
`save()`
, regardless of having changed or not,
unless you explicitly list the attributes to save.
unless you explicitly list the attributes to save.
See
[
active record docs
](
active-record.md
)
for more details.
Auto-quoting Table and Column Names
Auto-quoting Table and Column Names
------------------------------------
------------------------------------
...
@@ -483,14 +503,18 @@ the same goal.
...
@@ -483,14 +503,18 @@ the same goal.
]
]
```
```
More details in the
[
Url manager docs
](
url.md
)
.
Response
Response
--------
--------
TBD
Extensions
Extensions
----------
----------
TBD
Integration with Composer
Integration with Composer
-------------------------
-------------------------
...
...
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