Index: draggableviews.module IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- draggableviews.module (revision 76d7ca84425218e1e9f60633767bcbb5024a3d8c) +++ draggableviews.module (revision ) @@ -58,10 +58,23 @@ 'left_table' => $base_table, 'left_field' => $entity_keys['id'], 'field' => 'entity_id', + 'extra' => array( + array('field' => 'view_name', 'value' => '***VIEW_ID***'), + array('field' => 'view_display', 'value' => '***VIEW_DISPLAY***'), + ), ); } } } + +/** + * Implements hook_views_query_substitutions(). + * + * Allow replacement of current userid so we can cache these queries. + */ +function draggableviews_views_query_substitutions(\Drupal\views\ViewExecutable $view) { + return array('***VIEW_ID***' => $view->id(), '***VIEW_DISPLAY***' => $view->current_display); +} /** * Implements hook_preprocess_views_view_table().