You are here

private function ContentTaxonomyAutocompleteModeratedTermsSearchAPIProcessor::getTaxonomyField in Content Taxonomy 7

Helper function that extracts the taxonomy field from a search API property name.

2 calls to ContentTaxonomyAutocompleteModeratedTermsSearchAPIProcessor::getTaxonomyField()
ContentTaxonomyAutocompleteModeratedTermsSearchAPIProcessor::filterTaxonomyFieldsOptions in includes/content_taxonomy_autocomplete_moderated_terms.inc
Helper function that filters the configuration field options for taxonomy fields.
ContentTaxonomyAutocompleteModeratedTermsSearchAPIProcessor::getTaxonomyFields in includes/content_taxonomy_autocomplete_moderated_terms.inc
Helper function that returns the taxonomy fields for the given search API property names.

File

includes/content_taxonomy_autocomplete_moderated_terms.inc, line 112

Class

ContentTaxonomyAutocompleteModeratedTermsSearchAPIProcessor
Search API Processor that filters out terms from moderated vocabularies.

Code

private function getTaxonomyField($search_api_property_name) {
  $parts = explode(':', $search_api_property_name);
  foreach ($parts as $part) {
    if (substr($part, 0, 6) == 'field_') {
      $field = field_info_field($part);
      if ($field && isset($field['type']) && $field['type'] == "taxonomy_term_reference") {
        return $field;
      }
    }
  }
  return FALSE;
}