interface LinkitSearchPluginInterface in Linkit 7.3
Defines a common interface for a Linkit search plugin.
Hierarchy
- interface \LinkitSearchPluginInterface
Expanded class hierarchy of LinkitSearchPluginInterface
All classes that implement LinkitSearchPluginInterface
File
- includes/
search_plugin.class.php, line 12 - Linkit Search plugin interface.
View source
interface LinkitSearchPluginInterface {
/**
* Search plugin factory method.
*
* @param $plugin
* A search plugin object.
*
* @param LinkitProfile $profile
* (optional) A LinkitProfile object.
*
* @return
* An instance of the search plugin class or an instance of the
* LinkitSearchPluginBroken class.
*/
public static function factory($plugin, LinkitProfile $profile);
/**
* Return a string representing this handler's name in the UI.
*/
public function ui_title();
/**
* Return a string representing this handler's description in the UI.
*/
public function ui_description();
/**
* Fetch search results based on the $search_string.
*
* @param $search_string
* A string that contains the text to search for.
*
* @return
* An associative array whose values are an
* associative array containing:
* - title: A string to use as the search result label.
* - description: (optional) A string with additional information about the
* result item.
* - path: The URL to the item.
* - group: (optional) A string with the group name for the result item.
* Best practice is to use the plugin name as group name.
* - addClass: (optional) A string with classes to add to the result row..
*/
public function fetchResults($search_string);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LinkitSearchPluginInterface:: |
public static | function | Search plugin factory method. | 1 |
LinkitSearchPluginInterface:: |
public | function | Fetch search results based on the $search_string. | 2 |
LinkitSearchPluginInterface:: |
public | function | Return a string representing this handler's description in the UI. | 1 |
LinkitSearchPluginInterface:: |
public | function | Return a string representing this handler's name in the UI. | 1 |