You are here

protected function SearchApiAttachmentsParagraphsAlterSettings::getFileFields in Search API attachments 7

Helper method to get all file fields.

Return value

array contaigning all the file fields names.

Overrides SearchApiAttachmentsAlterSettings::getFileFields

2 calls to SearchApiAttachmentsParagraphsAlterSettings::getFileFields()
SearchApiAttachmentsParagraphsAlterSettings::alterItems in contrib/search_api_attachments_paragraphs/includes/callback_attachments_paragraphs_settings.inc
Alter items before indexing.
SearchApiAttachmentsParagraphsAlterSettings::propertyInfo in contrib/search_api_attachments_paragraphs/includes/callback_attachments_paragraphs_settings.inc
Adds attachments property.

File

contrib/search_api_attachments_paragraphs/includes/callback_attachments_paragraphs_settings.inc, line 97
Search API data alteration callback.

Class

SearchApiAttachmentsParagraphsAlterSettings

Code

protected function getFileFields() {
  $ret = array();
  foreach (field_info_fields() as $name => $field) {
    if ($field['type'] == 'file') {
      $ret[$name] = $field;
    }
  }
  return $ret;
}