protected function SearchApiFederatedSolrRemap::indexFieldOptions in Search API Federated Solr 7
Same name and namespace in other branches
- 7.3 src/SearchApiFederatedSolrRemap.php \SearchApiFederatedSolrRemap::indexFieldOptions()
- 7.2 src/SearchApiFederatedSolrRemap.php \SearchApiFederatedSolrRemap::indexFieldOptions()
Get a form options array containing all of the fields that can be remapped.
Return value
array
1 call to SearchApiFederatedSolrRemap::indexFieldOptions()
File
- src/
SearchApiFederatedSolrRemap.php, line 129
Class
- SearchApiFederatedSolrRemap
- Class SearchApiFederatedSolrRemap Provides a Search API index data alteration that remaps property names for indexed items.
Code
protected function indexFieldOptions() {
$options = array_diff_key($this->index
->getFields(FALSE), $this
->federatedFields());
array_walk($options, function (&$item, $key) {
$item = t('@name (@machine_name)', [
'@name' => $item['name'],
'@machine_name' => $key,
]);
});
return [
'- ' . t('None') . ' -',
] + $options;
}