You are here

function bbb_menu in BigBlueButton 8

Same name and namespace in other branches
  1. 6 bbb.module \bbb_menu()
  2. 7 bbb.module \bbb_menu()

Implement HOOK_menu().

File

modules/bbb_node/bbb_node.module, line 32
Big Blue Button - Enables universities and colleges to deliver a high-quality learning experience.

Code

function bbb_menu() {
  $items = [];

  // @ToDo: Move rest of hook_menu into the relevant configuration.
  $show_local_tasks = \Drupal::config('bbb_node.settings')
    ->get('local_tasks');
  $items['node/%node/meeting/attend'] = [
    'title' => 'Attend Meeting',
    'route_name' => 'bbb_node.meeting.attend',
    'type' => $show_local_tasks ? 'MENU_LOCAL_TASK' : 'MENU_CALLBACK',
    'weight' => 2,
  ];
  $items['node/%node/meeting/moderate'] = [
    'title' => 'Moderate Meeting',
    'route_name' => 'bbb_node.meeting.moderate',
    'type' => $show_local_tasks ? 'MENU_LOCAL_TASK' : 'MENU_CALLBACK',
    'weight' => 2,
  ];
  $items['node/%node/meeting/end-confirm'] = [
    'title' => 'Terminate Meeting',
    'type' => 'MENU_CALLBACK',
  ];
  $items['node/%node/redirect/attend'] = [
    'type' => 'MENU_CALLBACK',
  ];
  $items['node/%node/redirect/moderate'] = [
    'type' => 'MENU_CALLBACK',
  ];
  $items['node/%node/meeting/status'] = [
    'type' => 'MENU_CALLBACK',
  ];
  return $items;
}