example_element_menu

Versions
5
example_element_menu($may_cache)
6 – 7
example_element_menu()

Implementation of hook_menu().

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

Code

developer/examples/example_element.module, line 32

<?php
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
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.