You are here

public function Index::getFulltextFields in Search API 8

Retrieves all of this index's fulltext fields.

Return value

string[] An array containing the field identifiers of all indexed fulltext fields available for this index.

Overrides IndexInterface::getFulltextFields

File

src/Entity/Index.php, line 796

Class

Index
Defines the search index configuration entity.

Namespace

Drupal\search_api\Entity

Code

public function getFulltextFields() {
  $fulltext_fields = [];
  foreach ($this
    ->getFields() as $key => $field) {
    if (\Drupal::getContainer()
      ->get('search_api.data_type_helper')
      ->isTextType($field
      ->getType())) {
      $fulltext_fields[] = $key;
    }
  }
  return $fulltext_fields;
}