You are here

function blockgroup_menu in Block Group 7

Same name and namespace in other branches
  1. 7.2 blockgroup.module \blockgroup_menu()

Implements hook_menu().

File

./blockgroup.module, line 38
Add block groups to block configuration page

Code

function blockgroup_menu() {
  $default_theme = variable_get('theme_default', 'bartik');
  $items['admin/structure/block/manage/blockgroup/%blockgroup/delete'] = array(
    'title' => 'Delete block group',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'blockgroup_delete_confirm',
      5,
    ),
    'access arguments' => array(
      'administer block groups',
    ),
    'type' => MENU_CALLBACK,
    'context' => MENU_CONTEXT_NONE,
    'file' => 'blockgroup.admin.inc',
  );
  $items['admin/structure/block/groupadd'] = array(
    'title' => 'Add group',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'blockgroup_add_form',
    ),
    'access arguments' => array(
      'administer block groups',
    ),
    'type' => MENU_LOCAL_ACTION,
    'file' => 'blockgroup.admin.inc',
  );
  foreach (list_themes() as $key => $theme) {
    if ($key != $default_theme) {
      $items['admin/structure/block/list/' . $key . '/groupadd'] = array(
        'title' => 'Add group',
        'page callback' => 'drupal_get_form',
        'page arguments' => array(
          'blockgroup_add_form',
        ),
        'access arguments' => array(
          'administer block groups',
        ),
        'type' => MENU_LOCAL_ACTION,
        'file' => 'blockgroup.admin.inc',
      );
    }
  }
  return $items;
}