From 096aa350d94cc091170146273a7acf1e1e28604f Mon Sep 17 00:00:00 2001 From: bach Date: Wed, 21 Aug 2024 23:20:12 +0200 Subject: [PATCH] fixed custom module d10 copatibility --- .../Field/FieldType/ComputedCommerceProductReferences.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/modules/custom/materio_home/src/Plugin/Field/FieldType/ComputedCommerceProductReferences.php b/web/modules/custom/materio_home/src/Plugin/Field/FieldType/ComputedCommerceProductReferences.php index 41581b11..6d57c3b0 100644 --- a/web/modules/custom/materio_home/src/Plugin/Field/FieldType/ComputedCommerceProductReferences.php +++ b/web/modules/custom/materio_home/src/Plugin/Field/FieldType/ComputedCommerceProductReferences.php @@ -8,6 +8,7 @@ use Drupal\Core\Field\FieldItemList; use Drupal\Core\TypedData\TypedDataInterface; use Drupal\Core\Field\BaseFieldDefinition; use Drupal\Core\TypedData\ComputedItemListTrait; +use Drupal\menu_test\Access\AccessCheck; // https://www.drupal.org/node/2112677 // https://www.cornel.co/article/entity-reference-computed-field-example-drupal @@ -40,6 +41,7 @@ class ComputedCommerceProductReferences extends EntityReferenceFieldItemList ->sort('created', 'ASC') // ->exists('field_visuel') ->condition('type', 'materio_product_license_type') + ->AccessCheck() ->range(0,12); $ids = $query->execute(); $i = 0;