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) {
throw new NotFoundHttpException();
}
$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);
// Fix the current path for paging.
if (!empty($path)) {
......
......@@ -344,8 +344,7 @@ protected function setupValidMocks($use_ajax = self::USE_AJAX) {
$display_handler->expects($this->never())
->method('setOption');
$display_handler->expects($this->any())
->method('getOption')
->with('use_ajax')
->method('ajaxEnabled')
->willReturn($use_ajax);
$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