<?php/**
* @file
* Contains \Drupal\views\Ajax\ViewAjaxResponse.
*/namespaceDrupal\views\Ajax;
useDrupal\Core\Ajax\AjaxResponse;
useDrupal\views\ViewExecutable;
/**
* Custom JSON response object for an ajax view response.
*
* We use a special response object to be able to fire a proper alter hook.
*/class ViewAjaxResponseextends AjaxResponse {
/**
* The view executed on this ajax request.
*
* @var \Drupal\views\ViewExecutable
*/
protected $view;
/**
* Sets the executed view of this response.
*
* @param \Drupal\views\ViewExecutable $view
* The View executed on this ajax request.
*/
public functionsetView(ViewExecutable $view) {
$this->view = $view;
}
/**
* Gets the executed view of this response.
*
* @return \Drupal\views\ViewExecutable $view
* The View executed on this ajax request.
*/
public functiongetView() {
return$this->view;
}
}