In this example, it's a plugin block. The magic takes place in the build()
method of the block. In this example, we're loading all the main menu entities, and teasing out the plain URL, passing that through to our JS layer. Of course, anything could be done with the data once it's been fetched this way.
Created
November 28, 2022 17:35
-
-
Save twfahey1/46adee1f30a6f132ef3ca844fa9616c1 to your computer and use it in GitHub Desktop.
Drupal 8, 9+ - Loading a menu programmatically
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment