class TaxonomyThemeHooks
Hook implementations for taxonomy.
Hierarchy
- class \Drupal\taxonomy\Hook\TaxonomyThemeHooks
Expanded class hierarchy of TaxonomyThemeHooks
File
-
core/
modules/ taxonomy/ src/ Hook/ TaxonomyThemeHooks.php, line 10
Namespace
Drupal\taxonomy\HookView source
class TaxonomyThemeHooks {
/**
* Implements hook_theme_suggestions_HOOK().
*/
public function themeSuggestionsTaxonomyTerm(array $variables) : array {
$suggestions = [];
/** @var \Drupal\taxonomy\TermInterface $term */
$term = $variables['elements']['#taxonomy_term'];
$suggestions[] = 'taxonomy_term__' . $term->bundle();
$suggestions[] = 'taxonomy_term__' . $term->id();
return $suggestions;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
TaxonomyThemeHooks::themeSuggestionsTaxonomyTerm | public | function | Implements hook_theme_suggestions_HOOK(). |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.