class CustomTextDataType in Search API Solr 8.3
Same name in this branch
- 8.3 src/Plugin/Derivative/CustomTextDataType.php \Drupal\search_api_solr\Plugin\Derivative\CustomTextDataType
- 8.3 src/Plugin/search_api/data_type/CustomTextDataType.php \Drupal\search_api_solr\Plugin\search_api\data_type\CustomTextDataType
Same name and namespace in other branches
- 8.2 src/Plugin/Derivative/CustomTextDataType.php \Drupal\search_api_solr\Plugin\Derivative\CustomTextDataType
- 4.x src/Plugin/Derivative/CustomTextDataType.php \Drupal\search_api_solr\Plugin\Derivative\CustomTextDataType
Provides plugin definitions for custom full text data types.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
- class \Drupal\search_api_solr\Plugin\Derivative\CustomTextDataType implements ContainerDeriverInterface uses StringTranslationTrait
Expanded class hierarchy of CustomTextDataType
See also
\Drupal\search_api_solr\Plugin\search_api\data_type\CustomTextDataType
File
- src/
Plugin/ Derivative/ CustomTextDataType.php, line 16
Namespace
Drupal\search_api_solr\Plugin\DerivativeView source
class CustomTextDataType extends DeriverBase implements ContainerDeriverInterface {
use StringTranslationTrait;
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, $base_plugin_id) {
return new static();
}
/**
* {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
foreach (SolrFieldType::getAvailableCustomCodes() as $custom_code) {
$this->derivatives[$custom_code] = $base_plugin_definition;
$this->derivatives[$custom_code]['label'] = $this
->t('Fulltext ":custom_code"', [
':custom_code' => $custom_code,
]);
$this->derivatives[$custom_code]['prefix'] .= $custom_code;
}
return $this->derivatives;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CustomTextDataType:: |
public static | function |
Creates a new class instance. Overrides ContainerDeriverInterface:: |
|
CustomTextDataType:: |
public | function |
Gets the definition of all derivatives of a base plugin. Overrides DeriverBase:: |
|
DeriverBase:: |
protected | property | List of derivative definitions. | 1 |
DeriverBase:: |
public | function |
Gets the definition of a derivative plugin. Overrides DeriverInterface:: |
|
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |