You are here

function legal_menu in Legal 6.8

Same name and namespace in other branches
  1. 5 legal.module \legal_menu()
  2. 6.7 legal.module \legal_menu()
  3. 7.2 legal.module \legal_menu()
  4. 7 legal.module \legal_menu()

Implementation of hook_menu().

File

./legal.module, line 46
Displays Terms & Conditions, and makes sure they are accepted before registration is accepted.

Code

function legal_menu() {
  $items = array();
  $items['admin/settings/legal'] = array(
    'title' => 'Legal',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'legal_administration',
    ),
    'access arguments' => array(
      'administer Terms and Conditions',
    ),
    'description' => 'Display Terms and Conditions statement on the registration page.',
    'file' => 'legal.admin.inc',
  );
  $items['admin/settings/legal/terms'] = array(
    'title' => 'Add T&C',
    'access arguments' => array(
      'administer Terms and Conditions',
    ),
    'description' => 'Display Terms and Conditions statement on the registration page.',
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/settings/legal/languages'] = array(
    'title' => 'Languages',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'legal_languages',
    ),
    'access callback' => 'legal_languages_access',
    'access arguments' => array(
      'administer Terms and Conditions',
    ),
    'description' => 'Display Terms and Conditions statement on the registration page.',
    'weight' => 10,
    'type' => MENU_LOCAL_TASK,
    'file' => 'legal.admin.inc',
  );
  $items['legal'] = array(
    'title' => 'Terms and Conditions',
    'page callback' => 'legal_page',
    'access arguments' => array(
      'view Terms and Conditions',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'legal.pages.inc',
  );
  $items['legal_accept/%/%'] = array(
    'title' => 'Terms and Conditions',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'legal_login',
      1,
      2,
    ),
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  return $items;
}