Beispiel #1
0
 /**
  * Registers the needed assets
  */
 public function registerAssets()
 {
     $view = $this->getView();
     TypeaheadAsset::register($view);
     if ($this->useHandleBars) {
         TypeaheadHBAsset::register($view);
     }
     $this->registerPluginOptions('typeahead');
     $view->registerJs($this->_bloodhound);
     $view->registerJs('jQuery("#' . $this->options['id'] . '").typeahead(' . $this->_hashVar . ',' . $this->_dataset . ');');
     $this->registerPluginEvents($view);
 }
Beispiel #2
0
 /**
  * Registers the needed assets
  */
 public function registerAssets()
 {
     $view = $this->getView();
     TypeaheadAsset::register($view);
     if ($this->useHandleBars) {
         TypeaheadHBAsset::register($view);
     }
     $this->registerPluginOptions('typeahead');
     $id = $this->options['id'];
     $view->registerJs("{$this->_bloodhound}kvInitTA('{$id}', {$this->_hashVar}, {$this->_dataset});");
     $this->registerPluginEvents($view);
 }