You are here

function domain_prefix_menu in Domain Access 5

Same name and namespace in other branches
  1. 6.2 domain_prefix/domain_prefix.module \domain_prefix_menu()

Implement hook_menu()

File

domain_prefix/domain_prefix.module, line 30
Interface for selective table prefixing for use with Domain Access. For this module to work correctly, you will need to follow the INSTALL.txt instructions for editing your settings.php file.

Code

function domain_prefix_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'title' => t('Table prefixing'),
      'path' => 'admin/build/domain/prefix',
      'access' => user_access('administer table prefixing'),
      'type' => MENU_LOCAL_TASK,
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'domain_prefix_configure_form',
      ),
    );
  }
  else {
    $items[] = array(
      'title' => t('Domain prefix settings'),
      'path' => 'admin/build/domain/prefix/' . arg(4),
      'access' => user_access('administer table prefixing'),
      'type' => MENU_CALLBACK,
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'domain_prefix_form',
        arg(4),
      ),
    );
    $items[] = array(
      'title' => t('Domain prefix update'),
      'path' => 'domain_prefix_update',
      'access' => user_access('administer table prefixing'),
      'type' => MENU_CALLBACK,
      'callback' => 'domain_prefix_update',
    );
  }
  return $items;
}