public function MixitupFunc::populateFilters in MixItUp Views 8
Same name and namespace in other branches
- 8.2 src/MixitupFunc.php \Drupal\mixitup_views\MixitupFunc::populateFilters()
Populates structured array of used taxonomy terms.
Parameters
int $tid: Taxonomy id.
int $nid: Node id.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
1 call to MixitupFunc::populateFilters()
- MixitupFunc::getRowClasses in src/
MixitupFunc.php - Get classes string for node.
File
- src/
MixitupFunc.php, line 134
Class
- MixitupFunc
- Performs assistance functionality.
Namespace
Drupal\mixitup_viewsCode
public function populateFilters($tid, $nid) {
$term = $this->entityTypeManager
->getStorage('taxonomy_term')
->load($tid);
/* @var \Drupal\taxonomy\Entity\Term $term */
if (!empty($term)) {
$vid = $term
->bundle();
self::$populatedFilters[$vid]['.tid_' . $tid] = $term
->getName();
$this
->populateNodeFilters($nid, $tid);
}
}