diff --git a/src/Controller/ReservationController.php b/src/Controller/ReservationController.php index 22b044c..b6a03c5 100644 --- a/src/Controller/ReservationController.php +++ b/src/Controller/ReservationController.php @@ -41,7 +41,7 @@ class ReservationController extends ControllerBase implements ContainerInjection /** - * Take variables Year and Week_num can calculate variable + * Take variables Year and Week_num can calculate variables * need to populate all the prev/next links in the template. * * ( #pre_render callback function, for theme simplereservation_week_header ) @@ -52,7 +52,6 @@ class ReservationController extends ControllerBase implements ContainerInjection * Render array passed onto theme function. */ public static function calc_prev_next_links($build){ - $year = $build['#year']; $weekNum = $build['#weekNum']; $firstDay = date_create("$year-W$weekNum-1"); @@ -134,8 +133,8 @@ class ReservationController extends ControllerBase implements ContainerInjection 'week' => array( '#theme' => 'simplereservation_week', '#config' => array( - '#week' => date('W'), - '#year' => date('Y') + '#week' => $weekNum, + '#year' => $year, ) )