function ooe_menu

7.x-1.x ooe.module ooe_menu()

Implements hook_menu().

Delegates to OoeBridge::menu().

Instead of using structured arrays directly, the OoeBridge uses implementations of IMenuItem collected in an IMenuItemSet, which builds the hook_menu() array(s). This makes OoeBridge::menu() very compact, clear, and flexible, as contributions to the set of menu items may be collected from (for example) multiple IProject implementations.

Adapted from the Current Posts example: Preparing for a module configuration form

'hook_menu() implementations return an associative array whose keys define paths and whose values are an associative array of properties for each path. The definition for each path may include a page callback function, which is invoked when the registered path is requested. After we have set up our form in hook_menu, we will create the actual form by writing the page callback function we define here.'

'The name of this hook is a bit misleading, as it does far more than simply assign menu items. Using this hook, modules register paths to define how URL requests are handled. Paths may be registered for URL handling only, or as a link to be placed in a menu (usually the Navigation menu). In this case, we will set a path that will make the form available from the Configuration page'


./ooe.module, line 182
An educational tutorial module that demonstrates an Object-Oriented bridge between Drupal7 core's contributed module API and a fully Object-Oriented space. OOE stands for Object-Oriented Examples.


function ooe_menu() {
  return ooe()->menu();