- Issue created by @rodrigoaguilera
- First commit to issue fork.
- 🇺🇸United States smustgrave
Thanks for reporting think we will need a test case showing the issue
I am building a block that loads a huge menu, the core block tries to load many items at once causing performance issues so I'm trying to load the tree more progressively. I noticed the function loadSubtreeData from the storage
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Menu%21Me...
but reading the implementation it doesn't use the $max_relative_depth parameter
Call the function programmatically with a value for $max_relative_depth = 1 and notice it loads the whole subtree instead of just one level.
As far as I searched this method is not used in Drupal core.
Configure parameters like this
$parameters->setRoot($id)->onlyEnabledLinks()->setMaxDepth($max_relative_depth);
Code
None
None
None
None
Calling loadSubtreeData with $max_relative_depth from MenuTreeStorage correctly limits the subtree
Active
11.0 🔥
menu system
Thanks for reporting think we will need a test case showing the issue