protected function SearchApiFulltext::getFulltextFields in Search API 8
Same name in this branch
- 8 src/Plugin/views/filter/SearchApiFulltext.php \Drupal\search_api\Plugin\views\filter\SearchApiFulltext::getFulltextFields()
- 8 src/Plugin/views/argument/SearchApiFulltext.php \Drupal\search_api\Plugin\views\argument\SearchApiFulltext::getFulltextFields()
Retrieves a list of all available fulltext fields.
Return value
string[] An options list of fulltext field identifiers mapped to their prefixed labels.
3 calls to SearchApiFulltext::getFulltextFields()
- SearchApiFulltext::buildExposedForm in src/
Plugin/ views/ filter/ SearchApiFulltext.php - Render our chunk of the exposed filter form when selecting
- SearchApiFulltext::buildOptionsForm in src/
Plugin/ views/ filter/ SearchApiFulltext.php - Provide the basic form which calls through to subforms. If overridden, it is best to call through to the parent, or to at least make sure all of the functions in this form are called.
- SearchApiFulltext::query in src/
Plugin/ views/ filter/ SearchApiFulltext.php - Add this filter to the query.
File
- src/
Plugin/ views/ filter/ SearchApiFulltext.php, line 484
Class
- SearchApiFulltext
- Defines a filter for adding a fulltext search to the view.
Namespace
Drupal\search_api\Plugin\views\filterCode
protected function getFulltextFields() {
$fields = [];
/** @var \Drupal\search_api\IndexInterface $index */
$index = Index::load(substr($this->table, 17));
$fields_info = $index
->getFields();
foreach ($index
->getFulltextFields() as $field_id) {
$fields[$field_id] = $fields_info[$field_id]
->getPrefixedLabel();
}
return $fields;
}