interface DataTypeInterface in Search API 8
Defines an interface for data type plugins.
Hierarchy
- interface \Drupal\search_api\Plugin\HideablePluginInterface; interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Component\Plugin\DerivativeInspectionInterface; interface \Drupal\Core\Plugin\ContainerFactoryPluginInterface
- interface \Drupal\search_api\DataType\DataTypeInterface
Expanded class hierarchy of DataTypeInterface
All classes that implement DataTypeInterface
See also
\Drupal\search_api\Annotation\SearchApiDataType
\Drupal\search_api\DataType\DataTypePluginManager
\Drupal\search_api\DataType\DataTypePluginBase
2 files declare their use of DataTypeInterface
- AggregatedFieldsTest.php in tests/
src/ Unit/ Processor/ AggregatedFieldsTest.php - ItemFieldTest.php in tests/
src/ Unit/ ItemFieldTest.php
File
- src/
DataType/ DataTypeInterface.php, line 18
Namespace
Drupal\search_api\DataTypeView source
interface DataTypeInterface extends HideablePluginInterface, PluginInspectionInterface, DerivativeInspectionInterface, ContainerFactoryPluginInterface {
/**
* Returns the label of the data type.
*
* @return string
* The administration label.
*/
public function label();
/**
* Returns the description of the data type.
*/
public function getDescription();
/**
* Converts a field value to match the data type (if needed).
*
* @param mixed $value
* The value to convert.
*
* @return mixed
* The converted value.
*/
public function getValue($value);
/**
* Returns the fallback default data type for this data type.
*
* @return string
* The fallback default data type.
*/
public function getFallbackType();
/**
* Determines whether this data type is a default data type.
*
* Default data types are provided by the Search API module itself and have to
* be supported by all backends. They therefore are the only ones that can be
* used as a fallback for other data types, and don't need to have a fallback
* type themselves.
*
* @return bool
* TRUE if the data type is a default type, FALSE otherwise.
*/
public function isDefault();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ContainerFactoryPluginInterface:: |
public static | function | Creates an instance of the plugin. | 112 |
DataTypeInterface:: |
public | function | Returns the description of the data type. | 1 |
DataTypeInterface:: |
public | function | Returns the fallback default data type for this data type. | 1 |
DataTypeInterface:: |
public | function | Converts a field value to match the data type (if needed). | 1 |
DataTypeInterface:: |
public | function | Determines whether this data type is a default data type. | 1 |
DataTypeInterface:: |
public | function | Returns the label of the data type. | 1 |
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 |