From 300a5d14e8c9a1e8c54cf9e5660fb29c9382016c Mon Sep 17 00:00:00 2001 From: bach Date: Thu, 31 Aug 2023 11:23:18 +0200 Subject: [PATCH] added corresponfing entity reference for proximity and superposition --- .../sync/cer.corresponding_reference.proximite.yml | 13 +++++++++++++ .../cer.corresponding_reference.superposition.yml | 13 +++++++++++++ .../SchemaExtension/OuattSchemaExtension.php | 2 +- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 src/config/sync/cer.corresponding_reference.proximite.yml create mode 100644 src/config/sync/cer.corresponding_reference.superposition.yml diff --git a/src/config/sync/cer.corresponding_reference.proximite.yml b/src/config/sync/cer.corresponding_reference.proximite.yml new file mode 100644 index 0000000..3ee1228 --- /dev/null +++ b/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 diff --git a/src/config/sync/cer.corresponding_reference.superposition.yml b/src/config/sync/cer.corresponding_reference.superposition.yml new file mode 100644 index 0000000..17b8306 --- /dev/null +++ b/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 diff --git a/src/web/modules/custom/ouatt_graphql/src/Plugin/GraphQL/SchemaExtension/OuattSchemaExtension.php b/src/web/modules/custom/ouatt_graphql/src/Plugin/GraphQL/SchemaExtension/OuattSchemaExtension.php index 5f19709..702980c 100644 --- a/src/web/modules/custom/ouatt_graphql/src/Plugin/GraphQL/SchemaExtension/OuattSchemaExtension.php +++ b/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();