public static function SolrFieldType::getAvailableCustomCodes in Search API Solr 8.2
Same name and namespace in other branches
- 8.3 src/Entity/SolrFieldType.php \Drupal\search_api_solr\Entity\SolrFieldType::getAvailableCustomCodes()
- 4.x src/Entity/SolrFieldType.php \Drupal\search_api_solr\Entity\SolrFieldType::getAvailableCustomCodes()
Get all available custom codes.
Return value
array
3 calls to SolrFieldType::getAvailableCustomCodes()
- CustomTextDataType::getDerivativeDefinitions in src/
Plugin/ Derivative/ CustomTextDataType.php - Gets the definition of all derivatives of a base plugin.
- OmitNormsCustomTextDataType::getDerivativeDefinitions in src/
Plugin/ Derivative/ OmitNormsCustomTextDataType.php - Gets the definition of all derivatives of a base plugin.
- SearchApiSolrBackend::supportsDataType in src/
Plugin/ search_api/ backend/ SearchApiSolrBackend.php - Determines whether the backend supports a given add-on data type.
File
- src/
Entity/ SolrFieldType.php, line 162
Class
- SolrFieldType
- Defines the SolrFieldType entity.
Namespace
Drupal\search_api_solr\EntityCode
public static function getAvailableCustomCodes() {
$custom_codes = [];
$config_factory = \Drupal::configFactory();
foreach ($config_factory
->listAll('search_api_solr.solr_field_type.') as $field_type_name) {
$config = $config_factory
->get($field_type_name);
if ($custom_code = $config
->get('custom_code')) {
$custom_codes[] = $custom_code;
}
}
return array_unique($custom_codes);
}