You are here

public function BBBMeetingTypeController::attendRedirect in BigBlueButton 8

Redirect to meeting.

1 call to BBBMeetingTypeController::attendRedirect()
BBBMeetingTypeController::moderate in modules/bbb_node/src/Controller/BBBMeetingTypeController.php
Redirect to big blue button instance.
1 string reference to 'BBBMeetingTypeController::attendRedirect'
bbb_node.routing.yml in modules/bbb_node/bbb_node.routing.yml
modules/bbb_node/bbb_node.routing.yml

File

modules/bbb_node/src/Controller/BBBMeetingTypeController.php, line 214

Class

BBBMeetingTypeController
Class BBBMeetingTypeController.

Namespace

Drupal\bbb_node\Controller

Code

public function attendRedirect(NodeInterface $node, $mode = 'attend') {
  if (is_numeric($node)) {

    /** @var \Drupal\node\NodeInterface $node */
    $node = $this->nodeStorage
      ->load($node);
  }
  $meeting = $this->nodeMeeting
    ->get($node, NULL, FALSE);
  if (empty($meeting->url[$mode])) {

    // Redirect not found.
    throw new NotFoundHttpException();
  }

  // Get redirect URL.
  $url = parse_url($meeting->url[$mode]);
  $fullurl = $url['scheme'] . '://' . $url['host'] . (isset($url['port']) ? ':' . $url['port'] : '') . $url['path'] . '?' . $url['query'];
  return new RedirectResponse($fullurl, 301);
}