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
027ea416
Commit
027ea416
authored
May 22, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #362 from lucianobaraglia/master
Fixing some outdated comments
parents
210faf78
767d99c3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
upgrade-from-v1.md
docs/guide/upgrade-from-v1.md
+5
-3
Menu.php
framework/yii/widgets/Menu.php
+0
-1
No files found.
docs/guide/upgrade-from-v1.md
View file @
027ea416
...
...
@@ -216,12 +216,14 @@ Using a widget is more straightforward in 2.0. You mainly use the `begin()`, `en
methods of the
`Widget`
class. For example,
```
php
// $this refers to the View object
// Note that you have to "echo" the result to display it
echo
\yii\widgets\Menu
::
widget
(
array
(
'items'
=>
$items
));
// $this refers to the View object
$form
=
\yii\widgets\ActiveForm
::
begin
(
$this
);
// Passing an array to initialize the object properties
$form
=
\yii\widgets\ActiveForm
::
begin
(
array
(
'options'
=>
array
(
'class'
=>
'form-horizontal'
),
'fieldConfig'
=>
array
(
'inputOptions'
=>
array
(
'class'
=>
'input-xlarge'
)),
));
...
form
inputs
here
...
\yii\widgets\ActiveForm
::
end
();
```
...
...
framework/yii/widgets/Menu.php
View file @
027ea416
...
...
@@ -26,7 +26,6 @@ use yii\helpers\Html;
* The following example shows how to use Menu:
*
* ~~~
* // $this is the view object currently being used
* echo Menu::widget(array(
* 'items' => array(
* // Important: you need to specify url as 'controller/action',
...
...
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