Skip to content

Instantly share code, notes, and snippets.

@slivorezka
Created November 7, 2016 09:13
Show Gist options
  • Save slivorezka/932f1ec1ae23328a4b53c9b131112954 to your computer and use it in GitHub Desktop.
Save slivorezka/932f1ec1ae23328a4b53c9b131112954 to your computer and use it in GitHub Desktop.
Drupal 8 Get taxonomy term tree By taxonomy vocabulary name ($vid)
<?php
$tree = \Drupal::entityTypeManager()->getStorage('tags')->loadTree('error_code', $parent = 0, $max_depth = NULL, $load_entities = FALSE);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment