Loading modules/location_variant/src/Plugin/views/relationship/Variant.php +10 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,16 @@ class Variant extends RelationshipPluginBase { $locations = $this->locationHandler->getLocationLineage($location_code); // Are we in a workspace? if ($this->moduleHandler->moduleExists('workspaces')) { $workspace_manager = \Drupal::service('workspaces.manager'); if ($workspace_manager->hasactiveworkspace()) { $field_data_table = $def['field_data_revision']; $variant_reference = $def['base_revision']; $location_field = 'variant_revision__locations'; } } // Normally with a variation code like ko-2 you would extract the ko part // with SUBSTRING_INDEX(langcode, '-', 1). We need to be able to extract the // langcode zh-hant from zh-hant-0 as well though. Lets flip the string over Loading Loading
modules/location_variant/src/Plugin/views/relationship/Variant.php +10 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,16 @@ class Variant extends RelationshipPluginBase { $locations = $this->locationHandler->getLocationLineage($location_code); // Are we in a workspace? if ($this->moduleHandler->moduleExists('workspaces')) { $workspace_manager = \Drupal::service('workspaces.manager'); if ($workspace_manager->hasactiveworkspace()) { $field_data_table = $def['field_data_revision']; $variant_reference = $def['base_revision']; $location_field = 'variant_revision__locations'; } } // Normally with a variation code like ko-2 you would extract the ko part // with SUBSTRING_INDEX(langcode, '-', 1). We need to be able to extract the // langcode zh-hant from zh-hant-0 as well though. Lets flip the string over Loading