mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 14:26:54 +08:00
Fixing some outdated comments
This commit is contained in:
@ -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();
|
||||
```
|
||||
|
@ -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',
|
||||
|
Reference in New Issue
Block a user