You are here

public function CalendarController::redirectToCalendar in Content Planner 8

Redirect and jump to a given Calendar directly.

Parameters

string $calendar_id:

Return value

\Symfony\Component\HttpFoundation\RedirectResponse

1 string reference to 'CalendarController::redirectToCalendar'
content_calendar.routing.yml in modules/content_calendar/content_calendar.routing.yml
modules/content_calendar/content_calendar.routing.yml

File

modules/content_calendar/src/Controller/CalendarController.php, line 249

Class

CalendarController
Class CalendarController.

Namespace

Drupal\content_calendar\Controller

Code

public function redirectToCalendar($year, $month) {
  $fragment = $year . '-' . $month;
  return $this
    ->redirect('content_calendar.calendar', [
    'year' => $year,
  ], [
    'fragment' => $fragment,
  ]);
}