Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / views / src / Ajax / ViewAjaxResponse.php
1 <?php
2
3 namespace Drupal\views\Ajax;
4
5 use Drupal\Core\Ajax\AjaxResponse;
6 use Drupal\views\ViewExecutable;
7
8 /**
9  * Custom JSON response object for an ajax view response.
10  *
11  * We use a special response object to be able to fire a proper alter hook.
12  */
13 class ViewAjaxResponse extends AjaxResponse {
14
15   /**
16    * The view executed on this ajax request.
17    *
18    * @var \Drupal\views\ViewExecutable
19    */
20   protected $view;
21
22   /**
23    * Sets the executed view of this response.
24    *
25    * @param \Drupal\views\ViewExecutable $view
26    *   The View executed on this ajax request.
27    */
28   public function setView(ViewExecutable $view) {
29     $this->view = $view;
30   }
31
32   /**
33    * Gets the executed view of this response.
34    *
35    * @return \Drupal\views\ViewExecutable
36    *   The View executed on this ajax request.
37    */
38   public function getView() {
39     return $this->view;
40   }
41
42 }