public function AutocompletionCallback::initDisplay 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::initDisplay()
Initializes the display plugin.
Parameters
\Drupal\views\ViewExecutable $view: The views executable.
array $display: The display that will be populated and attached to the view.
array $options: (optional) The options for the display plugin. Defaults to NULL.
Overrides DisplayPluginBase::initDisplay
File
- src/
Plugin/ views/ display/ AutocompletionCallback.php, line 143
Class
- AutocompletionCallback
- The plugin that handles Data response callbacks for REST resources.
Namespace
Drupal\search_autocomplete\Plugin\views\displayCode
public function initDisplay(ViewExecutable $view, array &$display, array &$options = NULL) {
parent::initDisplay($view, $display, $options);
$request_content_type = $this->view
->getRequest()
->getRequestFormat();
$this
->setContentType($request_content_type);
$this
->setMimeType($this->view
->getRequest()
->getMimeType($this->contentType));
}