Calendar final readonly class
Minn\Front\Calendar · public/minn/src/Minn/Front/Calendar.php · 99 lines
One month as the calendar widget and block draw it: a table whose caption names the month, whose head lists the week from the site's first day, and whose cells link the days a post was published on to that day's archive; today's cell carries the id the stylesheet lights; the nav below links the nearest months with posts on either side. Markup, whitespace and the attribute order of the two padding cells follow the reference byte for byte, since themes style the table by those hooks.
Constants and properties
| private | FIXED_DATE = 'F j, Y' | |
| private | readonly int $year | Promoted from the constructor. |
| private | readonly int $month | Promoted from the constructor. |
| private | readonly int $weekStart | Promoted from the constructor. |
| private | readonly Minn\Front\CalendarLabels $labels | Promoted from the constructor. |
| private | readonly Closure $link | Promoted from the constructor. |
Public
| new | __construct(int $year, int $month, int $weekStart, Minn\Front\CalendarLabels $labels, Closure $link)# |
| ||||||||||||
| method | render(array $postDays, ?array $previous, ?array $next, ?array $today): string# | The table and its navigation.
|
Internals 5
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | table(array $postDays, ?array $today): string# |
| ||||||
| private | head(): string# | |||||||
| private | cell(int $day, array $postDays, ?array $today): string# |
| ||||||
| private | navigation(?array $previous, ?array $next): string# |
| ||||||
| private | abbreviation(int $month): string# |
Nothing matches.