API / Minn\Front / PostNavigation

PostNavigation final class

Minn\Front\PostNavigation · public/minn/src/Minn/Front/PostNavigation.php · 36 lines

The links to the posts either side of this one, and the nav block that wraps them. The caller's format wraps the anchor: `%link` is the whole anchor, `%title` the post's title and `%date` its date, and the anchor carries rel="prev" or rel="next".

Titles arrive already filtered; this only assembles.

Uses 1

Public

staticprevious(string $url, string $title, string $format, string $linkFormat, string $date = ''): string#

A previous or next post link in the reference's format.

staticnext(string $url, string $title, string $format, string $linkFormat, string $date = ''): string#

The next-post link in the reference's format.

staticariaLabel(array $args, string $default): string#

The aria-label a navigation block carries: an explicit one wins, otherwise a caller-supplied screen-reader text stands in for it, and only with neither does the default apply.

$argsarray<string, mixed>the caller's own arguments

Internals 1

Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.

privatelink(string $url, string $title, string $format, string $linkFormat, string $rel, string $date): string#