You are here

public function MenuLeaf::__construct in Taxonomy Facets 8

File

src/MenuLeaf.php, line 16

Class

MenuLeaf

Namespace

Drupal\taxonomy_facets

Code

public function __construct($leaf_term_object, $leafClass = array()) {

  // Get fully loaded terms for all applied filters.
  $this->filtersObject = taxonomy_facets_get_selected_filters();
  $this->termName = $leaf_term_object->name;
  $this->tid = $leaf_term_object->tid;
  $this->vid = $leaf_term_object->vid;
  if ($leafClass) {
    $this->leafAnchorClass = $leafClass['leafAnchorClass'];
    $this->leafClass = $leafClass['leafClass'];
  }
  $this
    ->getTermUrlAlias();
  $this
    ->buildLinkUrl();
}