浏览代码

added corresponfing entity reference for proximity and superposition

bach 8 月之前
父节点
当前提交
300a5d14e8

+ 13 - 0
src/config/sync/cer.corresponding_reference.proximite.yml

@@ -0,0 +1,13 @@
+uuid: 3cfb601f-1cf7-48c5-bab3-ea5f01b03a48
+langcode: fr
+status: true
+dependencies: {  }
+id: proximite
+label: proximite
+enabled: true
+first_field: field_proximite
+second_field: field_proximite
+add_direction: append
+bundles:
+  node:
+    - entite

+ 13 - 0
src/config/sync/cer.corresponding_reference.superposition.yml

@@ -0,0 +1,13 @@
+uuid: 41d67b53-7e00-4a83-be3f-84609a882f4c
+langcode: fr
+status: true
+dependencies: {  }
+id: superposition
+label: Superposition
+enabled: true
+first_field: field_superposition
+second_field: field_superposition
+add_direction: append
+bundles:
+  node:
+    - entite

+ 1 - 1
src/web/modules/custom/ouatt_graphql/src/Plugin/GraphQL/SchemaExtension/OuattSchemaExtension.php

@@ -493,10 +493,10 @@ class OuattSchemaExtension extends SdlSchemaExtensionPluginBase {
           $paragraph_storage = \Drupal::entityTypeManager()->getStorage('paragraph');
           $query = $node_storage->getQuery()
             ->condition('type', ['concernement'], 'IN')
-            // ->condition('uid', $parent->id())
             ->accessCheck(TRUE);
           $results = $query->execute();
           $concernements = [];
+          // loop throught all concernements, then paragraphs to find wich one is pointing to this entite
           foreach ($results as $nid) {
             $concernement = $node_storage->load($nid);
             $entite_integre_paragraph_values = $concernement->field_entite->getValue();