I'm trying to figure out how to inject Drupal services into a custom service class. The class in question is my MenuService
which builds an associative array of menu items which will be encoded to json and sent as a response for my custom REST endpoint ( /api/menu/{menu_name}
).
As a part of that, I need three classes:
\Drupal\Core\Path\AliasManager
\Drupal\Core\Menu\MenuTreeParameters
\Drupal\Core\Menu\MenuLinkTree
Any help on tracking down the MenuTreeParameters
service would be helpful. I don't see it on this list. If it's not a defined service, can it be injected?
Note: Made some edits as I answered most of my own question