Loading core/modules/views/src/Plugin/views/join/JoinPluginBase.php +0 −1 Original line number Diff line number Diff line Loading @@ -150,7 +150,6 @@ * * Extensions of this class can be used to create more interesting joins. */ #[\AllowDynamicProperties] class JoinPluginBase extends PluginBase implements JoinPluginInterface { /** Loading core/modules/workspaces/src/ViewsQueryAlter.php +10 −2 Original line number Diff line number Diff line Loading @@ -63,6 +63,13 @@ class ViewsQueryAlter implements ContainerInjectionInterface { */ protected $languageManager; /** * An array of tables adjusted for workspace_association join. * * @var \WeakMap */ protected \WeakMap $adjustedTables; /** * Constructs a new ViewsQueryAlter instance. * Loading @@ -86,6 +93,7 @@ public function __construct(EntityTypeManagerInterface $entity_type_manager, Ent $this->viewsData = $views_data; $this->viewsJoinPluginManager = $views_join_plugin_manager; $this->languageManager = $language_manager; $this->adjustedTables = new \WeakMap(); } /** Loading Loading @@ -345,7 +353,7 @@ protected function ensureRevisionTable(EntityTypeInterface $entity_type, Sql $qu // If this table previously existed, but was not added by us, we need // to modify the join and make sure that 'workspace_association' comes // first. if (empty($table_queue[$alias]['join']->workspace_adjusted)) { if (!$this->adjustedTables->offsetExists($table_queue[$alias]['join'])) { $table_queue[$alias]['join'] = $this->getRevisionTableJoin($relationship, $base_revision_table, $revision_field, $workspace_association_table, $entity_type); // We also have to ensure that our 'workspace_association' comes before // this. Loading Loading @@ -398,7 +406,7 @@ protected function getRevisionTableJoin($relationship, $table, $field, $workspac /** @var \Drupal\views\Plugin\views\join\JoinPluginInterface $join */ $join = $this->viewsJoinPluginManager->createInstance('standard', $definition); $join->adjusted = TRUE; $join->workspace_adjusted = TRUE; $this->adjustedTables[$join] = TRUE; return $join; } Loading Loading
core/modules/views/src/Plugin/views/join/JoinPluginBase.php +0 −1 Original line number Diff line number Diff line Loading @@ -150,7 +150,6 @@ * * Extensions of this class can be used to create more interesting joins. */ #[\AllowDynamicProperties] class JoinPluginBase extends PluginBase implements JoinPluginInterface { /** Loading
core/modules/workspaces/src/ViewsQueryAlter.php +10 −2 Original line number Diff line number Diff line Loading @@ -63,6 +63,13 @@ class ViewsQueryAlter implements ContainerInjectionInterface { */ protected $languageManager; /** * An array of tables adjusted for workspace_association join. * * @var \WeakMap */ protected \WeakMap $adjustedTables; /** * Constructs a new ViewsQueryAlter instance. * Loading @@ -86,6 +93,7 @@ public function __construct(EntityTypeManagerInterface $entity_type_manager, Ent $this->viewsData = $views_data; $this->viewsJoinPluginManager = $views_join_plugin_manager; $this->languageManager = $language_manager; $this->adjustedTables = new \WeakMap(); } /** Loading Loading @@ -345,7 +353,7 @@ protected function ensureRevisionTable(EntityTypeInterface $entity_type, Sql $qu // If this table previously existed, but was not added by us, we need // to modify the join and make sure that 'workspace_association' comes // first. if (empty($table_queue[$alias]['join']->workspace_adjusted)) { if (!$this->adjustedTables->offsetExists($table_queue[$alias]['join'])) { $table_queue[$alias]['join'] = $this->getRevisionTableJoin($relationship, $base_revision_table, $revision_field, $workspace_association_table, $entity_type); // We also have to ensure that our 'workspace_association' comes before // this. Loading Loading @@ -398,7 +406,7 @@ protected function getRevisionTableJoin($relationship, $table, $field, $workspac /** @var \Drupal\views\Plugin\views\join\JoinPluginInterface $join */ $join = $this->viewsJoinPluginManager->createInstance('standard', $definition); $join->adjusted = TRUE; $join->workspace_adjusted = TRUE; $this->adjustedTables[$join] = TRUE; return $join; } Loading