Loading src/Plugin/Field/FieldFormatter/OfficeHoursFormatterBase.php +1 −1 Original line number Diff line number Diff line Loading @@ -335,7 +335,7 @@ abstract class OfficeHoursFormatterBase extends FormatterBase { /** * {@inheritdoc} */ public function getStatusTimeLeft(OfficeHoursItemListInterface $items, $langcode) { public function getStatusTimeLeft(OfficeHoursItemListInterface $items) { // @see https://www.drupal.org/docs/8/api/cache-api/cache-max-age // If there are no open days, cache forever. Loading src/Plugin/Field/FieldFormatter/OfficeHoursFormatterDefault.php +1 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ class OfficeHoursFormatterDefault extends OfficeHoursFormatterBase { ], ], '#cache' => [ 'max-age' => $this->getStatusTimeLeft($items, $langcode), 'max-age' => $this->getStatusTimeLeft($items), 'tags' => ['office_hours:field.default'], ], ]; Loading src/Plugin/Field/FieldFormatter/OfficeHoursFormatterStatus.php +1 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ class OfficeHoursFormatterStatus extends OfficeHoursFormatterBase { '#closed_text' => (string) $this->t($settings['current_status']['closed_text']), '#position' => $this->settings['current_status']['position'], '#cache' => [ 'max-age' => $this->getStatusTimeLeft($items, $langcode), 'max-age' => $this->getStatusTimeLeft($items), 'tags' => ['office_hours:field.status'], ], ]; Loading src/Plugin/Field/FieldFormatter/OfficeHoursFormatterTable.php +1 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ class OfficeHoursFormatterTable extends OfficeHoursFormatterBase { '#table' => $table, '#office_hours' => $office_hours, '#cache' => [ 'max-age' => $this->getStatusTimeLeft($items, $langcode), 'max-age' => $this->getStatusTimeLeft($items), 'tags' => ['office_hours:field.table'], ], Loading Loading
src/Plugin/Field/FieldFormatter/OfficeHoursFormatterBase.php +1 −1 Original line number Diff line number Diff line Loading @@ -335,7 +335,7 @@ abstract class OfficeHoursFormatterBase extends FormatterBase { /** * {@inheritdoc} */ public function getStatusTimeLeft(OfficeHoursItemListInterface $items, $langcode) { public function getStatusTimeLeft(OfficeHoursItemListInterface $items) { // @see https://www.drupal.org/docs/8/api/cache-api/cache-max-age // If there are no open days, cache forever. Loading
src/Plugin/Field/FieldFormatter/OfficeHoursFormatterDefault.php +1 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ class OfficeHoursFormatterDefault extends OfficeHoursFormatterBase { ], ], '#cache' => [ 'max-age' => $this->getStatusTimeLeft($items, $langcode), 'max-age' => $this->getStatusTimeLeft($items), 'tags' => ['office_hours:field.default'], ], ]; Loading
src/Plugin/Field/FieldFormatter/OfficeHoursFormatterStatus.php +1 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ class OfficeHoursFormatterStatus extends OfficeHoursFormatterBase { '#closed_text' => (string) $this->t($settings['current_status']['closed_text']), '#position' => $this->settings['current_status']['position'], '#cache' => [ 'max-age' => $this->getStatusTimeLeft($items, $langcode), 'max-age' => $this->getStatusTimeLeft($items), 'tags' => ['office_hours:field.status'], ], ]; Loading
src/Plugin/Field/FieldFormatter/OfficeHoursFormatterTable.php +1 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ class OfficeHoursFormatterTable extends OfficeHoursFormatterBase { '#table' => $table, '#office_hours' => $office_hours, '#cache' => [ 'max-age' => $this->getStatusTimeLeft($items, $langcode), 'max-age' => $this->getStatusTimeLeft($items), 'tags' => ['office_hours:field.table'], ], Loading