You are here

public function SelectedFilters::getSelectedFilterForVocabulary in Taxonomy Facets 8

File

src/SelectedFilters.php, line 98

Class

SelectedFilters

Namespace

Drupal\taxonomy_facets

Code

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