protected function MeetingController::buildNavigation in Opigno Moxtra 3.x
Same name and namespace in other branches
- 8 src/Controller/MeetingController.php \Drupal\opigno_moxtra\Controller\MeetingController::buildNavigation()
Returns render array for the navigation.
Parameters
\Drupal\opigno_moxtra\MeetingInterface $opigno_moxtra_meeting: Moxtra meeting.
Return value
array Render array.
3 calls to MeetingController::buildNavigation()
- MeetingController::buildMeetingEnded in src/
Controller/ MeetingController.php - Returns render array for the ended live meeting.
- MeetingController::buildMeetingScheduled in src/
Controller/ MeetingController.php - Returns render array for the scheduled live meeting.
- MeetingController::buildMeetingStarted in src/
Controller/ MeetingController.php - Returns render array for the started live meeting.
File
- src/
Controller/ MeetingController.php, line 69
Class
- MeetingController
- Class MeetingController.
Namespace
Drupal\opigno_moxtra\ControllerCode
protected function buildNavigation(MeetingInterface $opigno_moxtra_meeting) {
$gid = $opigno_moxtra_meeting
->getTrainingId();
if (empty($gid)) {
return [];
}
$actions = [];
$actions['form-actions'] = [
'#type' => 'container',
'#attributes' => [
'class' => [
'form-actions',
'action-wrapper',
],
'id' => 'edit-actions',
],
'#title' => 'test',
];
$title = $this
->t('Back to training homepage');
$route = 'entity.group.canonical';
$route_params = [
'group' => $gid,
];
$options = [
'attributes' => [
'class' => [
'btn',
'btn-rounded',
],
'id' => 'edit-submit',
],
];
$actions['form-actions'][] = Link::createFromRoute($title, $route, $route_params, $options)
->toRenderable();
return $actions;
}