API / Minn\Admin / StructureController

StructureController final readonly class

Minn\Admin\StructureController · public/minn/src/Minn/Admin/StructureController.php · 131 lines

The Structure view of minn-admin/v1: post types, taxonomies, and the terms switcher, each with its live counts, answered from the registries.

Used by 1

Constants and properties

privatereadonly Minn\Db $db

Promoted from the constructor.

privatereadonly Minn\Rest\Types $types

Promoted from the constructor.

privatereadonly Minn\Rest\Taxonomies $taxonomies

Promoted from the constructor.

privatereadonly Minn\Rest\Caller $caller

Promoted from the constructor.

Public

new__construct(Minn\Db $db, Minn\Rest\Types $types, Minn\Rest\Taxonomies $taxonomies, Minn\Rest\Caller $caller)#
methodtermTaxonomies(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/term-taxonomies (floor edit_posts)#

The taxonomies of each public type, for the Structure view.

methodpostTypes(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/post-types (floor edit_posts)#

The Structure view's post types: core and site-declared, with their live counts.

methodtaxonomies(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/taxonomies (floor edit_posts)#

Every taxonomy with its counts.

Internals 3

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

privatepublicTypes(): array#
@return list<string>
privatetermCount(string $taxonomy): int#
privatepostCount(string $type): int#