Tip:
Highlight text to annotate it
X
At this point, it makes sense to review the process that we would normally go through
to add a page in Drupal 7. So if we go back to the editor, I've opened up a file from
a Drupal 7 module called admin menu and I've scrolled down to the hook menu function.
So you saw we just added a hook menu for our glue module but the structure is quite a bit
different than what we see in Drupal 7. In Drupal 7, we specified the path and we also
specified the page callback. And this was a function that would return the data that
would display on the page.
So for this menu item, if we actually went to this URL in the browser, this function
would be called admin menu js cache and it would return the data to display.
So once you get used to that structure, it seems really intuitive to be able to use so
Drupal 8 is going to upset this a bit. Ultimately, it will probably make more sense to you than
the original system but it will take a little bit to sink in.