public function get(Theme $theme)
{
if (isset($this->settings['ajax_url'])) {
$this->properties['data-autocomplete-config']->ajax_url = $this->settings['ajax_url'];
}
if (isset($this->settings['ajax_ishtml'])) {
$this->properties['data-autocomplete-config']->ajax_ishtml = $this->settings['ajax_ishtml'];
}
if (isset($this->settings['allow_new'])) {
$this->properties['data-autocomplete-config']->tokenSeparators = array(',');
$this->properties['data-autocomplete-config']->allow_new = true;
}
if (isset($this->settings['init_selection'])) {
$this->properties['data-autocomplete-config']->init_selection = true;
}
$this->properties['data-autocomplete-config'] = json_encode($this->properties['data-autocomplete-config']);
/*
Stack::add('template_header_javascript', 'select2' );
Stack::add('template_stylesheet', 'select2-css');
*/
return parent::get($theme);
}