diff options
| author | Moritz Strohm <strohm@data-quest.de> | 2022-05-11 08:42:11 +0000 |
|---|---|---|
| committer | Moritz Strohm <strohm@data-quest.de> | 2022-05-11 08:42:11 +0000 |
| commit | f8529970a4018ee95b52a9c3bede75f3098186b4 (patch) | |
| tree | 936a46eff8ddbdb9dfc7e1463d3f82b8cb53c3ec /lib/models/ConsultationBlock.php | |
| parent | 6b3ca21b124871ca44af1584214a6eb5e907a06f (diff) | |
TIC #608
Merge request studip/studip!421
Diffstat (limited to 'lib/models/ConsultationBlock.php')
| -rw-r--r-- | lib/models/ConsultationBlock.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/models/ConsultationBlock.php b/lib/models/ConsultationBlock.php index 6020ebe..01b688a 100644 --- a/lib/models/ConsultationBlock.php +++ b/lib/models/ConsultationBlock.php @@ -394,4 +394,19 @@ class ConsultationBlock extends SimpleORMap implements PrivacyObject [$range->getRangeId(), $range->getRangeType()] ); } + + + /** + * @return string A string representation of the consultation block instance. + */ + public function __toString() : string + { + return sprintf( + _('Terminblock am %1$s, %2$s von %3$s bis %4$s Uhr'), + strftime('%A', $this->start), + strftime('%x', $this->start), + date('H:i', $this->start), + date('H:i', $this->end) + ); + } } |
