Click.php
7 months ago
Event.php
7 months ago
Order.php
7 months ago
Origin.php
7 months ago
Submission.php
7 months ago
View.php
7 months ago
Event.php
23 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWP\Journey\Events; |
| 4 | |
| 5 | use IAWPSCOPED\Carbon\CarbonImmutable; |
| 6 | /** @internal */ |
| 7 | abstract class Event |
| 8 | { |
| 9 | public abstract function type() : string; |
| 10 | public abstract function label() : string; |
| 11 | public abstract function created_at() : ?CarbonImmutable; |
| 12 | public abstract function html() : string; |
| 13 | public function created_at_for_humans() : string |
| 14 | { |
| 15 | $created_at = $this->created_at(); |
| 16 | if ($created_at === null) { |
| 17 | return ''; |
| 18 | } |
| 19 | $format = \IAWPSCOPED\iawp()->get_option('time_format', 'g:i a'); |
| 20 | return $created_at->format($format); |
| 21 | } |
| 22 | } |
| 23 |