API / Minn\Content / TermLinks

TermLinks final class

Minn\Content\TermLinks · public/minn/src/Minn/Content/TermLinks.php · 37 lines

A post's terms rendered as links, in the two shapes the reference emits: a plain joined run for a taxonomy, and the category list, which becomes a `post-categories` unordered list when the caller names no separator and a joined run when it does.

Names arrive already filtered; the caller applies the reference's own filters around the result.

Uses 1

Public

staticjoined(array $terms, string $rel, string $sep): string#

Anchor tags for these terms joined by a separator, the way the reference prints a term list.

$termslist<array{name: string, url: string}>
staticcategories(array $categories, string $separator): string#

The category list: an unordered list when the separator is empty, a joined run otherwise. Both carry rel="category tag". A row may bring markup to go before its link (its parents) and the space before rel.

$categorieslist<array{name: string, url: string, before?: string, space?: string}>

Internals 1

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

privateanchor(string $url, string $name, string $rel, string $space = ' '): string#