1 | <?php |
||
23 | class Bloodhound extends BaseObject |
||
24 | { |
||
25 | /** |
||
26 | * @var string the engine js name |
||
27 | */ |
||
28 | public $name; |
||
29 | /** |
||
30 | * @var array the configuration of Bloodhound suggestion engine. |
||
31 | * @see https://github.com/twitter/typeahead.js/blob/master/doc/bloodhound.md#options |
||
32 | */ |
||
33 | public $clientOptions = []; |
||
34 | |||
35 | /** |
||
36 | * @inheritdoc |
||
37 | * @throws \yii\base\InvalidConfigException |
||
38 | */ |
||
39 | 12 | public function init() |
|
46 | |||
47 | /** |
||
48 | * Returns the engine adapter. To be used to configure [[TypeAhead::dataSets]] `source` option. |
||
49 | * @return JsExpression |
||
50 | */ |
||
51 | 3 | public function getAdapterScript() |
|
55 | |||
56 | /** |
||
57 | * Returns the javascript initialization code |
||
58 | * @return string |
||
59 | */ |
||
60 | 6 | public function getClientScript() |
|
68 | } |
||
69 |