public function CustomTextDataType::getDerivativeDefinitions in Search API Solr 8.3
Same name and namespace in other branches
- 8.2 src/Plugin/Derivative/CustomTextDataType.php \Drupal\search_api_solr\Plugin\Derivative\CustomTextDataType::getDerivativeDefinitions()
- 4.x src/Plugin/Derivative/CustomTextDataType.php \Drupal\search_api_solr\Plugin\Derivative\CustomTextDataType::getDerivativeDefinitions()
Gets the definition of all derivatives of a base plugin.
Parameters
array $base_plugin_definition: The definition array of the base plugin.
Return value
array An array of full derivative definitions keyed on derivative id.
Overrides DeriverBase::getDerivativeDefinitions
See also
getDerivativeDefinition()
File
- src/
Plugin/ Derivative/ CustomTextDataType.php, line 30
Class
- CustomTextDataType
- Provides plugin definitions for custom full text data types.
Namespace
Drupal\search_api_solr\Plugin\DerivativeCode
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;
}