Skip to content

Commit

Permalink
Fixing some outdated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lucianobaraglia committed May 23, 2013
1 parent 210faf7 commit 767d99c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 5 additions & 3 deletions docs/guide/upgrade-from-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();
```
Expand Down
1 change: 0 additions & 1 deletion framework/yii/widgets/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
* 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',
Expand Down

0 comments on commit 767d99c

Please sign in to comment.