You are here

function taxonomy_facets_get_array_element in Taxonomy Facets 7.3

Same name and namespace in other branches
  1. 7.2 taxonomy_facets.module \taxonomy_facets_get_array_element()

Utility function to extract filter from array of filters.

For given vid, return filter element with vid equal to given vid.

Parameters

integer $vid: Vocabular id

array $filters: Array of filters.

Return value

array Array of info about particular filter.

File

./taxonomy_facets.module, line 332

Code

function taxonomy_facets_get_array_element($vid, $filters) {
  foreach ($filters as $fil) {
    if ($fil->vid == $vid) {
      return $fil;
    }
  }
  return NULL;
}