You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
engelsystem/includes/controller/public_dashboard_controller...

30 lines
659 B
PHTML

<?php
/**
* Loads all data for the public dashboard
*/
function public_dashboard_controller()
{
$stats = [
'needed-3-hours' => stats_angels_needed_three_hours(),
'needed-night' => stats_angels_needed_for_nightshifts(),
'angels-working' => stats_currently_working(),
'hours-to-work' => stats_hours_to_work()
];
$free_shifts = Shifts_free(time(), time() + 12 * 60 * 60);
return [
_('Public Dashboard'),
public_dashboard_view($stats, $free_shifts)
];
}
/**
* Returns url to public dashboard
*/
function public_dashboard_link()
{
return page_link_to('public-dashboard');
}
?>