I wanted to retrieve taxonomy terms from a certain vocabulary in Drupal 8.
Apparently I can still do it using
taxonomy_get_tree but it's deprecated.
I now have to use TermStorageInterface::loadTree
I am trying to access this function from a
Block but I don't understand how to instantiate the
I tried accessing the function directly but it's not a static function :
I tried instantiating the class but it told me
Cannot instantiate interface Drupal\taxonomy\TermStorageInterface
$test = new TermStorageInterface();
I don't understand how this class works and how I can access taxonomy links. I think I'm missing a big part of understanding how Drupal works.