API / Minn\Theme / ArchiveTitle

ArchiveTitle final class

Minn\Theme\ArchiveTitle · public/minn/src/Minn/Theme/ArchiveTitle.php · 55 lines

The label and name an archive titles itself with: `Category:` around the term, `Author:` around the display name, the date formatted for its granularity. One source of truth for the block path's query-title and the classic path's get_the_archive_title(), which used to compute the same labels separately. Search and post-type archives stay with their callers: their captured shapes differ between the two paths.

Public

staticparts(Minn\Front\Resolution $resolution, ?string $dateFormat): array#

The archive title's prefix and title for a resolution.

$dateFormatstring|nullthe site's date_format option, for day archives
@return array{string, string} the prefix (its colon included, in the site's language) and the escaped bare name; both empty when the view has none
staticcompose(string $prefix, string $name): string#

The reference's prefixed shape, `Category: <span>Uncategorized</span>`, through the language's own order.

Internals 2

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

privatedateParts(?array $date, ?string $dateFormat): array#
$datearray{0: int, 1: ?int, 2: ?int}|null
@return array{string, string}
privatetaxonomyLabel(string $taxonomy): string#

The singular label a plugin registered for its taxonomy, for the archive title prefix.