Loading src/Plugin/Field/FieldType/OfficeHoursItemList.php +3 −1 Original line number Diff line number Diff line Loading @@ -223,9 +223,11 @@ class OfficeHoursItemList extends FieldItemList implements OfficeHoursItemListIn // Make sure we only receive 1 day, only to calculate the cache. $office_hours = $this->getRows($settings, $field_settings, []); $next_day = array_shift($office_hours); if (!$next_day) { return Cache::PERMANENT; } // Get the difference in hours/minutes between 'now' and next open/closing time. $first_time = NULL; foreach ($next_day['slots'] as $slot) { $start = $slot['start']; $end = $slot['end']; Loading Loading
src/Plugin/Field/FieldType/OfficeHoursItemList.php +3 −1 Original line number Diff line number Diff line Loading @@ -223,9 +223,11 @@ class OfficeHoursItemList extends FieldItemList implements OfficeHoursItemListIn // Make sure we only receive 1 day, only to calculate the cache. $office_hours = $this->getRows($settings, $field_settings, []); $next_day = array_shift($office_hours); if (!$next_day) { return Cache::PERMANENT; } // Get the difference in hours/minutes between 'now' and next open/closing time. $first_time = NULL; foreach ($next_day['slots'] as $slot) { $start = $slot['start']; $end = $slot['end']; Loading