Documentation

SearchResultEntry
in package
implements JsonSerializable

Represents an entry in a list of results an app returns for a unified search query.

The app providing the results has to extend this class for customization. In most cases apps do not have to add any additional code.

Tags
example

`class MailResultEntry extends SearchResultEntry }

This approach was chosen over a final class as it allows Nextcloud to later add new optional properties of an entry without having to break the usage of this class in apps.

since
20.0.0

Interfaces, Classes and Traits

JsonSerializable

Table of Contents

$icon  : string
$resourceUrl  : string
$rounded  : bool
$subline  : string
$thumbnailUrl  : string
$title  : string
__construct()  : mixed
jsonSerialize()  : array

Properties

Methods

__construct()

public __construct(string $thumbnailUrl, string $title, string $subline, string $resourceUrl[, string $icon = '' ][, bool $rounded = false ]) : mixed
Parameters
$thumbnailUrl : string

a relative or absolute URL to the thumbnail or icon of the entry

$title : string

a main title of the entry

$subline : string

the secondary line of the entry

$resourceUrl : string

the URL where the user can find the detail, like a deep link inside the app

$icon : string = ''

the icon class or url to the icon

$rounded : bool = false

is the thumbnail rounded

Tags
since
20.0.0
Return values
mixed —

jsonSerialize()

public jsonSerialize() : array
Tags
since
20.0.0
Return values
array —

Search results