protected function MeetingController::buildMeetingStarted in Opigno Moxtra 3.x
Same name and namespace in other branches
- 8 src/Controller/MeetingController.php \Drupal\opigno_moxtra\Controller\MeetingController::buildMeetingStarted()
Returns render array for the started live meeting.
Parameters
\Drupal\opigno_moxtra\MeetingInterface $opigno_moxtra_meeting: The Live Meeting.
Return value
array Render array.
1 call to MeetingController::buildMeetingStarted()
- MeetingController::index in src/
Controller/ MeetingController.php - Returns index page for the live meeting.
File
- src/
Controller/ MeetingController.php, line 200
Class
- MeetingController
- Class MeetingController.
Namespace
Drupal\opigno_moxtra\ControllerCode
protected function buildMeetingStarted(MeetingInterface $opigno_moxtra_meeting) {
$config = $this
->config('opigno_moxtra.settings');
$client_id = $config
->get('client_id');
$org_id = $config
->get('org_id');
$access_token = $this->moxtraConnector
->getToken();
$binder_id = $opigno_moxtra_meeting
->getBinderId();
$topic = $opigno_moxtra_meeting
->getTitle();
$invitees = [];
$members = $opigno_moxtra_meeting
->getMembers();
foreach ($members as $member) {
$prefix = $this->moxtraConnector
->prefix($member);
$invitees[] = [
'unique_id' => $prefix . $member
->id(),
];
}
$url = $this->moxtraConnector
->getUrl();
$session_key = $opigno_moxtra_meeting
->getSessionKey();
return [
'#type' => 'container',
'meeting_wrapper' => [
'#type' => 'container',
'#attributes' => [
'class' => [
'content-box',
'meeting-started',
],
],
'meeting_container' => [
'#type' => 'container',
'#attributes' => [
'id' => 'live-meeting-container',
],
],
'max_reached' => [
'#type' => 'html_tag',
'#tag' => 'span',
'#attributes' => [
'id' => 'max_reached',
'style' => 'display: none;',
],
'#value' => $this
->t('The maximum number of users for this meeting is reached.'),
],
],
'navigation' => $this
->buildNavigation($opigno_moxtra_meeting),
'#attached' => [
'library' => [
'opigno_moxtra/moxtra.js',
'opigno_moxtra/meeting_started',
],
'drupalSettings' => [
'opignoMoxtra' => [
'mode' => 'production',
'clientId' => $client_id,
'orgId' => $org_id,
'accessToken' => $access_token,
'binderId' => $binder_id,
'sessionKey' => $session_key,
'topic' => $topic,
'baseDomain' => $url,
'invitees' => $invitees,
],
],
],
];
}