shiftsFilter = $shiftsFilter; } /** * Renders the filter. * * @param string $page_link Link pointing to the actual page. * @param array $dashboardFilter * * @return string Generated HTML */ public function render($page_link, $dashboardFilter = []) { $toolbar = []; if ($this->daySelectionEnabled && !empty($this->days)) { $selected_day = date('Y-m-d', $this->shiftsFilter->getStartTime()); $selected_day_formatted = dateWithEventDay($selected_day); $day_dropdown_items = []; foreach ($this->days as $value => $day) { $link = $page_link . '&shifts_filter_day=' . $value; $day_dropdown_items[] = toolbar_item_link($link, '', $day); } $toolbar[] = toolbar_dropdown($selected_day_formatted, $day_dropdown_items, true); if ($dashboardFilter) { $toolbar[] = sprintf( '