ISearchTemplate

interface OCP\FullTextSearch\Model\ISearchTemplate
Class ISearchTemplate
This is a data transfer object that should be created by Content Provider
when the getSearchTemplate() method is called.

The object will contain templates to be displayed, and the list of the different
options to be available to the user when he start a new search.

The display of the Options is generated by the FullTextSearch app and Options
can 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 integrate
a 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 the
FullTextSearch navigation page, in front of the related Content Provider.
Source:

lib/public/FullTextSearch/Model/ISearchTemplate.php#68

Parameters:
  • $class (string)
Since:

16.0.0

Returns:

\OCP\FullTextSearch\Model\ISearchTemplate

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:

lib/public/FullTextSearch/Model/ISearchTemplate.php#89

Parameters:
  • $css (string)
Since:

16.0.0

Returns:

\OCP\FullTextSearch\Model\ISearchTemplate

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 displayed
below the Options.
This should only be used if your Content Provider needs to set options in
a way not generated by FullTextSearch
Source:

lib/public/FullTextSearch/Model/ISearchTemplate.php#113

Parameters:
  • $template (string)
Since:

16.0.0

Returns:

\OCP\FullTextSearch\Model\ISearchTemplate

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 search
within the app that generate the content.
Source:

lib/public/FullTextSearch/Model/ISearchTemplate.php#137

Parameters:
See:

\OCP\FullTextSearch\Model\ISearchOption

Since:

16.0.0

Returns:

\OCP\FullTextSearch\Model\ISearchTemplate

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[]
public OCP\FullTextSearch\Model\ISearchTemplate::addNavigationOption($option)
Add an option in the left panel of the FullTextSearch navigation page.
Source:

lib/public/FullTextSearch/Model/ISearchTemplate.php#160

Parameters:
See:

\OCP\FullTextSearch\Model\ISearchOption

Since:

16.0.0

Returns:

\OCP\FullTextSearch\Model\ISearchTemplate

public OCP\FullTextSearch\Model\ISearchTemplate::getNavigationOptions()
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