Result
The generic result of a search
Tags
Table of Contents
- $id : string
- A unique identifier for the result, usually given as the item ID in its corresponding application.
- $link : string
- URL to the application item.
- $name : string
- The name of the item returned; this will be displayed in the search results.
- $type : string
- The type of search result returned; for consistency, name this the same as the class name (e.g. \OC\Search\File -> 'file') in lowercase.
- __construct() : mixed
- Create a new search result
Properties
$id
A unique identifier for the result, usually given as the item ID in its corresponding application.
public
string
$id
Tags
$link
URL to the application item.
public
string
$link
Tags
$name
The name of the item returned; this will be displayed in the search results.
public
string
$name
Tags
$type
The type of search result returned; for consistency, name this the same as the class name (e.g. \OC\Search\File -> 'file') in lowercase.
public
string
$type
= 'generic'
Tags
Methods
__construct()
Create a new search result
public
__construct([string $id = null ][, string $name = null ][, string $link = null ]) : mixed
Parameters
- $id : string = null
-
unique identifier from application: '[app_name]/[item_identifier_in_app]'
- $name : string = null
-
displayed text of result
- $link : string = null
-
URL to the result within its app