Skip to content

Commit

Permalink
#4190: Search API integration - Property label and description (#4191)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-korn authored Jun 11, 2024
1 parent 013f2c1 commit 33c8ca0
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 33c8ca0

Please sign in to comment.