ISearchTemplate¶
-
interface
OCP\FullTextSearch\Model\
ISearchTemplate
¶ - Class ISearchTemplateThis is a data transfer object that should be created by Content Providerwhen the getSearchTemplate() method is called.The object will contain templates to be displayed, and the list of the differentoptions to be available to the user when he start a new search.The display of the Options is generated by the FullTextSearch app and Optionscan be displayed in 2 places:- the navigation page of the app that generate the indexed content.(files, bookmarks, deck, mails, ...)- the navigation page of the FullTextSearch app.Both pages will have different Options, and only the first one can integratea specific template.
Implemented by: OC\FullTextSearch\Model\SearchTemplate
Source: lib/public/FullTextSearch/Model/ISearchTemplate.php#55
Methods¶
-
public
OCP\FullTextSearch\Model\ISearchTemplate::
setIcon
($class)¶ - Set the class of the icon to be displayed in the left panel of theFullTextSearch navigation page, in front of the related Content Provider.
Source: Parameters: - $class (string)
Since: 16.0.0
Returns:
-
public
OCP\FullTextSearch\Model\ISearchTemplate::
getIcon
()¶ - Get the class of the icon.
Source: lib/public/FullTextSearch/Model/ISearchTemplate.php#77 Since: 16.0.0 Returns: string
-
public
OCP\FullTextSearch\Model\ISearchTemplate::
setCss
($css)¶ - Set the path of a CSS file that will be loaded when needed.
Source: Parameters: - $css (string)
Since: 16.0.0
Returns:
-
public
OCP\FullTextSearch\Model\ISearchTemplate::
getCss
()¶ - Get the path of the CSS file.
Source: lib/public/FullTextSearch/Model/ISearchTemplate.php#98 Since: 16.0.0 Returns: string
-
public
OCP\FullTextSearch\Model\ISearchTemplate::
setTemplate
($template)¶ - Set the path of the file of a template that the HTML will be displayedbelow the Options.This should only be used if your Content Provider needs to set options ina way not generated by FullTextSearch
Source: Parameters: - $template (string)
Since: 16.0.0
Returns:
-
public
OCP\FullTextSearch\Model\ISearchTemplate::
getTemplate
()¶ - Get the path of the template file.
Source: lib/public/FullTextSearch/Model/ISearchTemplate.php#122 Since: 16.0.0 Returns: string
-
public
OCP\FullTextSearch\Model\ISearchTemplate::
addPanelOption
($option)¶ - Add an option in the Panel that is displayed when the user start a searchwithin the app that generate the content.
Source: Parameters: - $option (
OCP\FullTextSearch\Model\ISearchOption
)
See: Since: 16.0.0
Returns: - $option (
-
public
OCP\FullTextSearch\Model\ISearchTemplate::
getPanelOptions
()¶ - Get all options to be displayed in the Panel.
Source: lib/public/FullTextSearch/Model/ISearchTemplate.php#146 Since: 16.0.0 Returns: \OCP\FullTextSearch\Model\ISearchOption[]
- Add an option in the left panel of the FullTextSearch navigation page.
Source: Parameters: - $option (
OCP\FullTextSearch\Model\ISearchOption
)
See: Since: 16.0.0
Returns: - $option (
- Get all options to be displayed in the FullTextSearch navigation page.
Source: lib/public/FullTextSearch/Model/ISearchTemplate.php#169 Since: 16.0.0 Returns: array