Browse Source

minor fixes

tags/2.0.0-beta
Antonio Ramirez 12 years ago
parent
commit
6c25c8fca9
  1. 11
      yii/bootstrap/TypeAhead.php

11
yii/bootstrap/TypeAhead.php

@ -12,11 +12,11 @@ use yii\helpers\Html;
use yii\widgets\ActiveForm; use yii\widgets\ActiveForm;
/** /**
* Modal renders a modal window that can be toggled by clicking on a button. * TypeAhead renders a typehead bootstrap javascript component.
* *
* For example, * For example,
* *
* ~~~php * ```php
* echo TypeAhead::widget(array( * echo TypeAhead::widget(array(
* 'form' => $form, * 'form' => $form,
* 'model' => $model, * 'model' => $model,
@ -25,18 +25,18 @@ use yii\widgets\ActiveForm;
* 'source' => array('USA', 'ESP'), * 'source' => array('USA', 'ESP'),
* ), * ),
* )); * ));
* ~~~ * ```
* *
* The following example will use the name property instead * The following example will use the name property instead
* *
* ~~~php * ```php
* echo TypeAhead::widget(array( * echo TypeAhead::widget(array(
* 'name' => 'country', * 'name' => 'country',
* 'pluginOptions' => array( * 'pluginOptions' => array(
* 'source' => array('USA', 'ESP'), * 'source' => array('USA', 'ESP'),
* ), * ),
* )); * ));
* *```
* *
* @see http://twitter.github.io/bootstrap/javascript.html#typeahead * @see http://twitter.github.io/bootstrap/javascript.html#typeahead
* @author Antonio Ramirez <amigo.cobos@gmail.com> * @author Antonio Ramirez <amigo.cobos@gmail.com>
@ -87,6 +87,7 @@ class TypeAhead extends Widget
* If [[TypeAhead::form]] is null not from an [[ActiveForm]] instance, then the field will be rendered according to * If [[TypeAhead::form]] is null not from an [[ActiveForm]] instance, then the field will be rendered according to
* the `name` key setting of [[TypeAhead::options]] array attribute. * the `name` key setting of [[TypeAhead::options]] array attribute.
* @return string the rendering result * @return string the rendering result
* @throws InvalidParamException
*/ */
public function renderField() public function renderField()
{ {

Loading…
Cancel
Save