summaryrefslogtreecommitdiffstats
path: root/modules-available/locations
diff options
context:
space:
mode:
authorSimon Rettberg2022-04-19 11:23:34 +0200
committerSimon Rettberg2022-04-19 11:23:34 +0200
commitf00ef43187777414800fdc06c465afb551cbf437 (patch)
tree8bad0305923dc88710d47c2580b4bf60d9650fa7 /modules-available/locations
parent[statistics] Fix query builder (diff)
downloadslx-admin-f00ef43187777414800fdc06c465afb551cbf437.tar.gz
slx-admin-f00ef43187777414800fdc06c465afb551cbf437.tar.xz
slx-admin-f00ef43187777414800fdc06c465afb551cbf437.zip
Formatting/minor refactoring
Diffstat (limited to 'modules-available/locations')
-rw-r--r--modules-available/locations/inc/openingtimes.inc.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules-available/locations/inc/openingtimes.inc.php b/modules-available/locations/inc/openingtimes.inc.php
index 3417a213..72ce92f4 100644
--- a/modules-available/locations/inc/openingtimes.inc.php
+++ b/modules-available/locations/inc/openingtimes.inc.php
@@ -5,6 +5,12 @@ class OpeningTimes
/**
* Get opening times for given location.
+ * Format is the decoded JSON from DB column, i.e. currently a list of entries:
+ * {
+ * "days": ["Monday", "Tuesday", ...],
+ * "openingtime": "8:00",
+ * "closingtime": "20:00"
+ * }
*/
public static function forLocation(int $locationId)
{
@@ -14,7 +20,6 @@ class OpeningTimes
WHERE openingtime IS NOT NULL");
}
$chain = Location::getLocationRootChain($locationId);
- $openingTimes = null;
foreach ($chain as $lid) {
if (isset($openingTimesList[$lid])) {
if (is_string($openingTimesList[$lid])) {
@@ -25,4 +30,5 @@ class OpeningTimes
}
return null;
}
+
} \ No newline at end of file