Here is the D8 example how to access taxonomy terms based on the vocabulary machine name:
$terms = \Drupal::entityManager()->getStorage('taxonomy_term')->loadTree('categories'); foreach ($terms as $term) { //$value = $term->get('field_example')->getValue(); var_dump($term); } To load the whole entities, use: loadTree('categories', 0, NULL, TRUE).