/** * {@inheritdoc} */ protected function buildAutocompleteContext(array $options) { $context = parent::buildAutocompleteContext($options); if (isset($options['select2_options']['tags']) && $options['select2_options']['tags']) { $context->setProvider('select2_tags'); } else { $context->setProvider('select2'); } $context->setParameter('select2_template_result', $options['select2_template_result']); $context->setParameter('select2_template_selection', $options['select2_template_selection']); return $context; }
/** * {@inheritdoc} */ protected function buildAutocompleteContext(array $options) { $context = parent::buildAutocompleteContext($options); $context->setProvider('typeahead'); return $context; }