You are here

function domain_conf_menu in Domain Access 5

Same name and namespace in other branches
  1. 6.2 domain_conf/domain_conf.module \domain_conf_menu()
  2. 7.3 domain_conf/domain_conf.module \domain_conf_menu()
  3. 7.2 domain_conf/domain_conf.module \domain_conf_menu()

Implement hook_menu()

File

domain_conf/domain_conf.module, line 21
Domain manager configuration options.

Code

function domain_conf_menu($may_cache) {
  $items = array();
  if (!$may_cache) {
    $items[] = array(
      'title' => t('Domain site settings'),
      'path' => 'admin/build/domain/conf',
      'access' => user_access('administer domains') && user_access('administer site congifuration'),
      'type' => MENU_CALLBACK,
      'callback' => 'domain_conf_page',
      'callback arguments' => array(
        arg(4),
      ),
    );
    $items[] = array(
      'title' => t('Domain site settings'),
      'path' => 'admin/build/domain/conf-reset',
      'access' => user_access('administer domains') && user_access('administer site congifuration'),
      'type' => MENU_CALLBACK,
      'callback' => 'domain_conf_reset',
      'callback arguments' => array(
        arg(4),
      ),
    );

    // Allow sites to add implementations of hook_domainconf() without hacking.
    // See http://drupal.org/node/236877.
    if (arg(0) == 'admin') {
      $extra = drupal_get_path('module', 'domain_conf') . '/domain_conf.inc';
      if (file_exists($extra)) {
        include_once $extra;
      }
    }
  }
  return $items;
}