[development] Rename hook_menu ?

Jeremy Epstein jazepstein at gmail.com
Tue Dec 12 12:31:10 UTC 2006


On 12/12/06, Morbus Iff <morbus at disobey.com> wrote:
> I don't like hook_control. Far too generic. hook_router maybe.

I was thinking along similar lines: hook_route would be good IMO.
"Routes" or "Routing" is the name of the Ruby On Rails equivalent of
the "Drupal menu system". This would also be fitting, because Karoly's
proposed improvements for 6.x will make the menu system more like
RoR's routing system.

Another possibility is hook_map or hook_mapping - since the job of the
menu system is essentially to map URLs to callback functions.

Then again, do we really need to rename hook_menu? Developers are very
familiar with the current semantics, and a name change will cause more
than a bit of confusion. I also think that hook_menu is about as good
a name as any other.

Cheers,
Jaza.


More information about the development mailing list