You are here

protected function SearchApiAttachmentsAlterSettings::getFileFields in Search API attachments 7

Helper method to get all file fields.

Return value

array contaigning all the file fields names.

2 calls to SearchApiAttachmentsAlterSettings::getFileFields()
SearchApiAttachmentsAlterSettings::getIndexableFileFields in includes/callback_attachments_settings.inc
Retrieve list of fields, that should be indexed.
SearchApiAttachmentsAlterSettings::propertyInfo in includes/callback_attachments_settings.inc
Adds attachments property.
9 methods override SearchApiAttachmentsAlterSettings::getFileFields()
SearchApiAttachmentsCommentAlterSettings::getFileFields in contrib/search_api_attachments_comment/includes/callback_attachments_comment_settings.inc
Helper method to get all file fields.
SearchApiAttachmentsCommerceProductReferenceAlterSettings::getFileFields in contrib/search_api_attachments_commerce_product_reference/includes/callback_attachments_commerce_product_reference_settings.inc
Helper method to get all file fields.
SearchApiAttachmentsEntityreferenceAlterSettings::getFileFields in contrib/search_api_attachments_entityreference/includes/callback_attachments_entityreference_settings.inc
Helper method to get all file fields.
SearchApiAttachmentsFieldCollectionsAlterSettings::getFileFields in contrib/search_api_attachments_field_collections/includes/callback_attachments_field_collections_settings.inc
Helper method to get all file fields.
SearchApiAttachmentsMultifieldAlterSettings::getFileFields in contrib/search_api_attachments_multifield/includes/callback_attachments_multifield_settings.inc
Helper method to get all file fields.

... See full list

File

includes/callback_attachments_settings.inc, line 226
Search API data alteration callback.

Class

SearchApiAttachmentsAlterSettings
Indexes files content.

Code

protected function getFileFields() {
  $ret = array();
  foreach (field_info_fields() as $name => $field) {
    if ($field['type'] == 'file' && array_key_exists($this->index
      ->getEntityType(), $field['bundles'])) {
      $ret[$name] = $field;
    }
  }
  return $ret;
}