$subline = $this->generateSubline($vCard);
$resourceUrl = $this->getDeepLinkToContactsApp($addressBook['uri'], (string) $vCard->UID);
- return new SearchResultEntry($thumbnailUrl, $title, $subline, $resourceUrl, 'icon-contacts-dark', true);
+ $result = new SearchResultEntry($thumbnailUrl, $title, $subline, $resourceUrl, 'icon-contacts-dark', true);
+ $result->addAttribute("displayName", $title);
+ $result->addAttribute("email", $subline);
+ $result->addAttribute("phoneNumber", (string)$vCard->TEL);
+
+ return $result;
}, $searchResults);
return SearchResult::paginated(
use Sabre\VObject\Component;
use Sabre\VObject\DateTimeParser;
use Sabre\VObject\Property;
+use Sabre\VObject\Property\ICalendar\DateTime;
use function array_combine;
use function array_fill;
use function array_key_exists;
$calendar = $subscriptionsById[$eventRow['calendarid']];
}
$resourceUrl = $this->getDeepLinkToCalendarApp($calendar['principaluri'], $calendar['uri'], $eventRow['uri']);
+ $result = new SearchResultEntry('', $title, $subline, $resourceUrl, 'icon-calendar-dark', false);
- return new SearchResultEntry('', $title, $subline, $resourceUrl, 'icon-calendar-dark', false);
+ $dtStart = $component->DTSTART;
+
+ if ($dtStart instanceof DateTime) {
+ $startDateTime = $dtStart->getDateTime()->format('U');
+ $result->addAttribute("createdAt", $startDateTime);
+ }
+
+ return $result;
}, $searchResults);
return SearchResult::paginated(