Commit 0f36528a authored by catch's avatar catch

Issue #2904798 by dawehner, ahebrank: 8.3.7 Views SA patch should use...

Issue #2904798 by dawehner, ahebrank: 8.3.7 Views SA patch should use ajaxEnabled() and not check option 'use_ajax' directly
parent a338aac9
...@@ -142,7 +142,7 @@ public function ajaxView(Request $request) { ...@@ -142,7 +142,7 @@ public function ajaxView(Request $request) {
throw new NotFoundHttpException(); throw new NotFoundHttpException();
} }
$view = $this->executableFactory->get($entity); $view = $this->executableFactory->get($entity);
if ($view && $view->access($display_id) && $view->setDisplay($display_id) && $view->display_handler->getOption('use_ajax')) { if ($view && $view->access($display_id) && $view->setDisplay($display_id) && $view->display_handler->ajaxEnabled()) {
$response->setView($view); $response->setView($view);
// Fix the current path for paging. // Fix the current path for paging.
if (!empty($path)) { if (!empty($path)) {
......
...@@ -344,8 +344,7 @@ protected function setupValidMocks($use_ajax = self::USE_AJAX) { ...@@ -344,8 +344,7 @@ protected function setupValidMocks($use_ajax = self::USE_AJAX) {
$display_handler->expects($this->never()) $display_handler->expects($this->never())
->method('setOption'); ->method('setOption');
$display_handler->expects($this->any()) $display_handler->expects($this->any())
->method('getOption') ->method('ajaxEnabled')
->with('use_ajax')
->willReturn($use_ajax); ->willReturn($use_ajax);
$display_collection = $this->getMockBuilder('Drupal\views\DisplayPluginCollection') $display_collection = $this->getMockBuilder('Drupal\views\DisplayPluginCollection')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment