class OmitNormsCustomTextDataType in Search API Solr 4.x
Same name in this branch
- 4.x src/Plugin/Derivative/OmitNormsCustomTextDataType.php \Drupal\search_api_solr\Plugin\Derivative\OmitNormsCustomTextDataType
- 4.x src/Plugin/search_api/data_type/OmitNormsCustomTextDataType.php \Drupal\search_api_solr\Plugin\search_api\data_type\OmitNormsCustomTextDataType
Same name and namespace in other branches
- 8.3 src/Plugin/Derivative/OmitNormsCustomTextDataType.php \Drupal\search_api_solr\Plugin\Derivative\OmitNormsCustomTextDataType
- 8.2 src/Plugin/Derivative/OmitNormsCustomTextDataType.php \Drupal\search_api_solr\Plugin\Derivative\OmitNormsCustomTextDataType
Provides plugin definitions for custom full text data types which omit norms.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
- class \Drupal\search_api_solr\Plugin\Derivative\OmitNormsCustomTextDataType implements ContainerDeriverInterface uses StringTranslationTrait
Expanded class hierarchy of OmitNormsCustomTextDataType
See also
\Drupal\search_api_solr\Plugin\search_api\data_type\CustomTextDataType
File
- src/
Plugin/ Derivative/ OmitNormsCustomTextDataType.php, line 16
Namespace
Drupal\search_api_solr\Plugin\DerivativeView source
class OmitNormsCustomTextDataType 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" Omit norms', [
':custom_code' => $custom_code,
]);
$this->derivatives[$custom_code]['prefix'] .= $custom_code;
}
return $this->derivatives;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DeriverBase:: |
protected | property | List of derivative definitions. | 1 |
DeriverBase:: |
public | function |
Gets the definition of a derivative plugin. Overrides DeriverInterface:: |
|
OmitNormsCustomTextDataType:: |
public static | function |
Creates a new class instance. Overrides ContainerDeriverInterface:: |
|
OmitNormsCustomTextDataType:: |
public | function |
Gets the definition of all derivatives of a base plugin. Overrides DeriverBase:: |
|
StringTranslationTrait:: |
protected | property | The string translation service. | 4 |
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. |