Get menu item of a content type Is it possible to get the menu item of a certain content type through the API?

The idea is to improve Markus Orenstrat solution to set the active trail based on the content type. As it stands it requires hardcoding the menu_tree id in the service. 

 if ($bundle == 'blog') {
   $plugin_id = 'menu_link_content:a00a209d-075e-46a2-b200-e2d439d92228b';
 }


I figured this could be avoided since the administration area allows to assign a menu item to a content type.
That's stored in the third party settings of the node type.

$type = NodeType::load('article');
$type-&gt;getThirdPartySetting('menu_ui', 'parent')


See also menu_ui_get_menu_link_defaults().