From 33c8ca0953ca32af6aec6797b5c9766c6542fdc3 Mon Sep 17 00:00:00 2001 From: Stefan Korn Date: Tue, 11 Jun 2024 21:04:59 +0200 Subject: [PATCH] #4190: Search API integration - Property label and description (#4191) --- .../modules/metastore_search/src/ComplexData/Dataset.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/metastore/modules/metastore_search/src/ComplexData/Dataset.php b/modules/metastore/modules/metastore_search/src/ComplexData/Dataset.php index 7f6de9c78e..252ce210c1 100644 --- a/modules/metastore/modules/metastore_search/src/ComplexData/Dataset.php +++ b/modules/metastore/modules/metastore_search/src/ComplexData/Dataset.php @@ -52,6 +52,8 @@ private static function getPropertyDefinition($type, $object, $property_name) { } else { $defs[$property_name] = self::getDefinitionObject($type); + $defs[$property_name]->setLabel($object->properties->{$property_name}->title ?? $property_name); + $defs[$property_name]->setDescription($object->properties->{$property_name}->description ?? ''); } return $defs; } @@ -79,6 +81,8 @@ private static function getComplexPropertyDefinition($property_items, $type, $pr foreach ($child_properties as $child) { $definitions[$prefix . $child] = self::getDefinitionObject($type); + $definitions[$prefix . $child]->setLabel($props->{$child}->title ?? $property_name); + $definitions[$prefix . $child]->setDescription($props->{$child}->description ?? ''); } return $definitions; }