SearchResultEntry¶
-
class
OCP\Search\
SearchResultEntry
¶ - Represents an entry in a list of results an app returns for a unified searchquery.The app providing the results has to extend this class for customization. Inmost cases apps do not have to add any additional code.
Source: lib/public/Search/SearchResultEntry.php#47 Implements: JsonSerializable
Properties¶
-
protected static property
OCP\Search\SearchResultEntry::$
thumbnailUrl
¶ Source: lib/public/Search/SearchResultEntry.php#53 Type: string Since: 20.0.0
-
protected static property
OCP\Search\SearchResultEntry::$
title
¶ Source: lib/public/Search/SearchResultEntry.php#59 Type: string Since: 20.0.0
-
protected static property
OCP\Search\SearchResultEntry::$
subline
¶ Source: lib/public/Search/SearchResultEntry.php#65 Type: string Since: 20.0.0
-
protected static property
OCP\Search\SearchResultEntry::$
resourceUrl
¶ Source: lib/public/Search/SearchResultEntry.php#71 Type: string Since: 20.0.0
-
protected static property
OCP\Search\SearchResultEntry::$
icon
¶ Source: lib/public/Search/SearchResultEntry.php#77 Type: string Since: 20.0.0
-
protected static property
OCP\Search\SearchResultEntry::$
rounded
¶ Source: lib/public/Search/SearchResultEntry.php#83 Type: bool Since: 20.0.0
-
protected static property
OCP\Search\SearchResultEntry::$
attributes
¶ Source: lib/public/Search/SearchResultEntry.php#90 Type: string[] Since: 20.0.0
Methods¶
-
public
OCP\Search\SearchResultEntry::
__construct
($thumbnailUrl, $title, $subline, $resourceUrl, $icon="", $rounded=false)¶ Source: 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) is the thumbnail rounded
Since: 20.0.0
-
public
OCP\Search\SearchResultEntry::
addAttribute
($key, $value)¶ - Add optional attributes to the result entry, e.g. an ID or some othercontext information that can be read by the client application
Source: Parameters: - $key (string)
- $value (string)
Since: 20.0.0
-
public
OCP\Search\SearchResultEntry::
jsonSerialize
()¶ Source: lib/public/Search/SearchResultEntry.php#134 Returns: array Since: 20.0.0