protected function Vocabulary::determineCountVisibility in Sitemap 8.2
Same name and namespace in other branches
- 2.0.x src/Plugin/Sitemap/Vocabulary.php \Drupal\sitemap\Plugin\Sitemap\Vocabulary::determineCountVisibility()
Determine whether the usage count for a term should be displayed.
Parameters
\stdClass $term:
Return value
boolean
1 call to Vocabulary::determineCountVisibility()
- Vocabulary::buildSitemapTerm in src/
Plugin/ Sitemap/ Vocabulary.php - Builds a taxonomy term item.
File
- src/
Plugin/ Sitemap/ Vocabulary.php, line 431
Class
- Vocabulary
- Provides a sitemap for an taxonomy vocabulary.
Namespace
Drupal\sitemap\Plugin\SitemapCode
protected function determineCountVisibility($term) {
if ($this->settings['show_count']) {
if ($threshold = $this->settings['term_count_threshold']) {
if ($term->count >= $threshold) {
return TRUE;
}
}
else {
return TRUE;
}
}
return FALSE;
}