You are here

public function SelectedFilters::getSelectedFilterTermForVocabulary in Taxonomy Facets 8

File

src/SelectedFilters.php, line 107

Class

SelectedFilters

Namespace

Drupal\taxonomy_facets

Code

public function getSelectedFilterTermForVocabulary($vid) {
  foreach ($this->terms as $term) {
    if ($term
      ->getVocabularyId() == $vid) {
      return $term;
    }
  }
  return null;
}