API / Minn\Admin / AdminTypes

AdminTypes final class

Minn\Admin\AdminTypes · public/minn/src/Minn/Admin/AdminTypes.php · 85 lines

Admin-facing type facts (viewable, labels, supports, the edit gate) live beside, not inside, the wp/v2 registry, so the types route's payload stays byte-faithful.

Constants and properties

private?array $extra
privatereadonly Minn\Rest\Types $types

Promoted from the constructor.

privatereadonly Minn\Auth\Capabilities $capabilities

Promoted from the constructor.

Public

new__construct(Minn\Rest\Types $types, Minn\Auth\Capabilities $capabilities)#
methodextra(): array#

The types beyond post and page the app may show, with their labels.

methodsection(int $userId): array#

The boot-status types section: edit-visible types for this user, slimmed.

methodrestBaseOf(string $slug): string#

The rest_base of a type slug.

methodsingularOf(string $slug): string#

A type's singular label.

methodeditable(): array#

The viewable types a person edits in the app: slug => rest base. @return array<string, string>

@return array<string, string>
methodcommentsEnabled(): bool#

Whether a UI post type still supports comments.