summaryrefslogtreecommitdiff
path: root/includes/view/Rooms_view.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/view/Rooms_view.php')
-rw-r--r--includes/view/Rooms_view.php38
1 files changed, 24 insertions, 14 deletions
diff --git a/includes/view/Rooms_view.php b/includes/view/Rooms_view.php
index 7afdc67b..802b4c8e 100644
--- a/includes/view/Rooms_view.php
+++ b/includes/view/Rooms_view.php
@@ -1,20 +1,30 @@
<?php
-use Engelsystem\ShiftsFilterRenderer;
use Engelsystem\ShiftCalendarRenderer;
+use Engelsystem\ShiftsFilterRenderer;
-function Room_view($room, ShiftsFilterRenderer $shiftsFilterRenderer, ShiftCalendarRenderer $shiftCalendarRenderer) {
- return page_with_title(glyph('map-marker') . $room['Name'], [
- $shiftsFilterRenderer->render(room_link($room)) ,
- $shiftCalendarRenderer->render()
- ]);
+/**
+ * @param array $room
+ * @param ShiftsFilterRenderer $shiftsFilterRenderer
+ * @param ShiftCalendarRenderer $shiftCalendarRenderer
+ * @return string
+ */
+function Room_view($room, ShiftsFilterRenderer $shiftsFilterRenderer, ShiftCalendarRenderer $shiftCalendarRenderer)
+{
+ return page_with_title(glyph('map-marker') . $room['Name'], [
+ $shiftsFilterRenderer->render(room_link($room)),
+ $shiftCalendarRenderer->render()
+ ]);
}
-function Room_name_render($room) {
- global $privileges;
- if (in_array('view_rooms', $privileges)) {
- return '<a href="' . room_link($room) . '">' . glyph('map-marker') . $room['Name'] . '</a>';
- }
- return glyph('map-marker') . $room['Name'];
+/**
+ * @param array $room
+ * @return string
+ */
+function Room_name_render($room)
+{
+ global $privileges;
+ if (in_array('view_rooms', $privileges)) {
+ return '<a href="' . room_link($room) . '">' . glyph('map-marker') . $room['Name'] . '</a>';
+ }
+ return glyph('map-marker') . $room['Name'];
}
-
-?> \ No newline at end of file