protected function AutocompletionCallback::defineOptions in Search Autocomplete 8
Same name and namespace in other branches
- 2.x src/Plugin/views/display/AutocompletionCallback.php \Drupal\search_autocomplete\Plugin\views\display\AutocompletionCallback::defineOptions()
Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase:defineOptions().
Overrides PathPluginBase::defineOptions
File
- src/
Plugin/ views/ display/ AutocompletionCallback.php, line 291
Class
- AutocompletionCallback
- The plugin that handles Data response callbacks for REST resources.
Namespace
Drupal\search_autocomplete\Plugin\views\displayCode
protected function defineOptions() {
$options = parent::defineOptions();
// Set the default style plugin to 'json'.
$options['style']['contains']['type']['default'] = 'callback_serializer';
$options['row']['contains']['type']['default'] = 'callback_fields';
$options['defaults']['default']['style'] = FALSE;
$options['defaults']['default']['row'] = FALSE;
// Remove css/exposed form settings,
// as they are not used for the data display.
unset($options['exposed_form']);
unset($options['exposed_block']);
unset($options['css_class']);
return $options;
}