example_element_menu

5 example_element.module example_element_menu($may_cache)

Implementation of hook_menu().

This just defines a page that we can use to test our form elements.

File

developer/examples/example_element.module, line 32
This is an example demonstrating how a module can define custom form elements.

Code

function example_element_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'example_element', 
      'title' => t('Example element demo'), 
      'access' => user_access('access content'), 
      'type' => MENU_NORMAL_ITEM, 
      'callback' => 'drupal_get_form', 
      'callback arguments' => array('example_element_demo'),
    );
  }
  return $items;
}
Login or register to post comments