SearchTemplate¶
-
class
OC\FullTextSearch\Model\
SearchTemplate
¶ - 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.
Source: lib/private/FullTextSearch/Model/SearchTemplate.php#59 Implements: OCP\FullTextSearch\Model\ISearchTemplate
JsonSerializable
Properties¶
Methods¶
-
public
OC\FullTextSearch\Model\SearchTemplate::
__construct
($icon="", $css="")¶ - ISearchTemplate constructor.the class of the icon and the css file to be loaded can be set during thecreation of the object.
Source: Parameters: - $icon (string)
- $css (string)
Since: 15.0.0
-
public
OC\FullTextSearch\Model\SearchTemplate::
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: 15.0.0
Returns:
-
public
OC\FullTextSearch\Model\SearchTemplate::
getIcon
()¶ - Get the class of the icon.
Source: lib/private/FullTextSearch/Model/SearchTemplate.php#118 Since: 15.0.0 Returns: string
-
public
OC\FullTextSearch\Model\SearchTemplate::
setCss
($css)¶ - Set the path of a CSS file that will be loaded when needed.
Source: Parameters: - $css (string)
Since: 15.0.0
Returns:
-
public
OC\FullTextSearch\Model\SearchTemplate::
getCss
()¶ - Get the path of the CSS file.
Source: lib/private/FullTextSearch/Model/SearchTemplate.php#145 Since: 15.0.0 Returns: string
-
public
OC\FullTextSearch\Model\SearchTemplate::
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: 15.0.0
Returns:
-
public
OC\FullTextSearch\Model\SearchTemplate::
getTemplate
()¶ - Get the path of the template file.
Source: lib/private/FullTextSearch/Model/SearchTemplate.php#175 Since: 15.0.0 Returns: string
-
public
OC\FullTextSearch\Model\SearchTemplate::
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: 15.0.0
Returns: - $option (
-
public
OC\FullTextSearch\Model\SearchTemplate::
getPanelOptions
()¶ - Get all options to be displayed in the Panel.
Source: lib/private/FullTextSearch/Model/SearchTemplate.php#205 Since: 15.0.0 Returns: \OC\FullTextSearch\Model\SearchOption[]
- Add an option in the left panel of the FullTextSearch navigation page.
Source: Parameters: - $option (
OCP\FullTextSearch\Model\ISearchOption
)
See: Since: 15.0.0
Returns: - $option (
- Get all options to be displayed in the FullTextSearch navigation page.
Source: lib/private/FullTextSearch/Model/SearchTemplate.php#234 Since: 15.0.0 Returns: array
-
public
OC\FullTextSearch\Model\SearchTemplate::
jsonSerialize
()¶ Source: lib/private/FullTextSearch/Model/SearchTemplate.php#244 Since: 15.0.0 Returns: array