interface BackendInterface in Search API 8
Defines an interface for search backend plugins.
Consists of general plugin methods and the backend-specific methods defined in \Drupal\search_api\Backend\BackendSpecificInterface, as well as special CRUD "hook" methods that cannot be present on the server entity (which also implements \Drupal\search_api\Backend\BackendSpecificInterface).
Hierarchy
- interface \Drupal\search_api\Plugin\ConfigurablePluginInterface; interface \Drupal\search_api\Backend\BackendSpecificInterface
- interface \Drupal\search_api\Backend\BackendInterface
Expanded class hierarchy of BackendInterface
All classes that implement BackendInterface
See also
\Drupal\search_api\Annotation\SearchApiBackend
\Drupal\search_api\Backend\BackendPluginManager
\Drupal\search_api\Backend\BackendPluginBase
2 files declare their use of BackendInterface
- ConfigOverrideKernelTest.php in tests/
src/ Kernel/ ConfigEntity/ ConfigOverrideKernelTest.php - MethodOverrides.php in tests/
search_api_test/ src/ MethodOverrides.php
File
- src/
Backend/ BackendInterface.php, line 21
Namespace
Drupal\search_api\BackendView source
interface BackendInterface extends ConfigurablePluginInterface, BackendSpecificInterface {
/**
* Retrieves the server entity for this backend.
*
* @return \Drupal\search_api\ServerInterface
* The server entity.
*/
public function getServer();
/**
* Sets the server entity for this backend.
*
* @param \Drupal\search_api\ServerInterface $server
* The server entity.
*
* @return $this
*/
public function setServer(ServerInterface $server);
/**
* Reacts to the server's creation.
*
* Called once, when the server is first created. Allows the backend class to
* set up its necessary infrastructure.
*/
public function postInsert();
/**
* Notifies the backend that its configuration is about to be updated.
*
* The server's $original property can be used to inspect the old
* configuration values.
*
* Take care, though, that the server at this point might be override-free and
* thus contain property values (and apparent changes) which will not actually
* go into effect. If this might influence the code in this method, you have
* to manually check for overrides to ensure no incorrect action is taken.
*
* @see \Drupal\search_api\Utility\Utility::getConfigOverrides()
*/
public function preUpdate();
/**
* Notifies the backend that its configuration was updated.
*
* The server's $original property can be used to inspect the old
* configuration values.
*
* @return bool
* TRUE, if the update requires reindexing of all content on the server.
*/
public function postUpdate();
/**
* Notifies the backend that the server is about to be deleted.
*
* This should execute any necessary cleanup operations.
*
* Note that you shouldn't call the server's save() method, or any
* methods that might do that, from inside of this method as the server isn't
* present in the database anymore at this point.
*/
public function preDelete();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BackendInterface:: |
public | function | Retrieves the server entity for this backend. | 1 |
BackendInterface:: |
public | function | Reacts to the server's creation. | 1 |
BackendInterface:: |
public | function | Notifies the backend that its configuration was updated. | 1 |
BackendInterface:: |
public | function | Notifies the backend that the server is about to be deleted. | 1 |
BackendInterface:: |
public | function | Notifies the backend that its configuration is about to be updated. | 1 |
BackendInterface:: |
public | function | Sets the server entity for this backend. | 1 |
BackendSpecificInterface:: |
public | function | Adds a new index to this server. | 2 |
BackendSpecificInterface:: |
public | function | Deletes all the items from the index. | 4 |
BackendSpecificInterface:: |
public | function | Deletes the specified items from the index. | 4 |
BackendSpecificInterface:: |
public | function | Provides information on additional fields made available by the backend. | 2 |
BackendSpecificInterface:: |
public | function | Limits the processors displayed in the UI for indexes on this server. | 2 |
BackendSpecificInterface:: |
public | function | Returns all features that this backend supports. | 2 |
BackendSpecificInterface:: |
public | function | Indexes the specified items. | 4 |
BackendSpecificInterface:: |
public | function | Returns a boolean with the availability of the backend. | 2 |
BackendSpecificInterface:: |
public | function | Removes an index from this server. | 2 |
BackendSpecificInterface:: |
public | function | Executes a search on this server. | 4 |
BackendSpecificInterface:: |
public | function | Determines whether the backend supports a given add-on data type. | 2 |
BackendSpecificInterface:: |
public | function | Notifies the server that an index attached to it has been changed. | 2 |
BackendSpecificInterface:: |
public | function | Returns additional, backend-specific information about this server. | 2 |
ConfigurableInterface:: |
public | function | Gets default configuration for this plugin. | 11 |
ConfigurableInterface:: |
public | function | Gets this plugin's configuration. | 12 |
ConfigurableInterface:: |
public | function | Sets the configuration for this plugin instance. | 12 |
ConfigurablePluginInterface:: |
public | function | Returns the plugin's description. | 1 |
ConfigurablePluginInterface:: |
public | function | Returns the label for use on the administration pages. | 1 |
ConfigurablePluginInterface:: |
public | function | Informs the plugin that some of its dependencies are being removed. | 1 |
ContainerFactoryPluginInterface:: |
public static | function | Creates an instance of the plugin. | 112 |
DependentPluginInterface:: |
public | function | Calculates dependencies for the configured plugin. | 19 |
DerivativeInspectionInterface:: |
public | function | Gets the base_plugin_id of the plugin instance. | 1 |
DerivativeInspectionInterface:: |
public | function | Gets the derivative_id of the plugin instance. | 1 |
HideablePluginInterface:: |
public | function | Determines whether this plugin should be hidden in the UI. | 1 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |