For some content type, I need to attach my node to a parent menu item. I don't want to do that with UI (because too many nodes). I saw something like that for Drupal 7 (works in a preprocess):
menu_tree_set_path('main-menu', 'my/parent/path');
Do you know a way to do that with Drupal 8 (menu_tree_set_path seems undefined) ?