You are here

protected function SearchApiViewsHandlerArgumentFulltext::getFulltextFields in Search API 7

Helper method to get an option list of all available fulltext fields.

1 call to SearchApiViewsHandlerArgumentFulltext::getFulltextFields()
SearchApiViewsHandlerArgumentFulltext::options_form in contrib/search_api_views/includes/handler_argument_fulltext.inc
Extend the options form a bit.

File

contrib/search_api_views/includes/handler_argument_fulltext.inc, line 100
Contains SearchApiViewsHandlerArgumentFulltext.

Class

SearchApiViewsHandlerArgumentFulltext
Views argument handler class for handling fulltext fields.

Code

protected function getFulltextFields() {
  $ret = array();
  $index = search_api_index_load(substr($this->table, 17));
  if (!empty($index->options['fields'])) {
    $fields = $index
      ->getFields();
    foreach ($index
      ->getFulltextFields() as $field) {
      $ret[$field] = $fields[$field]['name'];
    }
  }
  return $ret;
}