StructureController final readonly class
Minn\Admin\StructureController · public/minn/src/Minn/Admin/StructureController.php · 159 lines
The Structure view of minn-admin/v1: post types, taxonomies, and the terms switcher, each with its live counts, answered from the registries.
Constants and properties
| private | readonly Minn\Db $db | Promoted from the constructor. |
| private | readonly Minn\Rest\Types $types | Promoted from the constructor. |
| private | readonly Minn\Rest\Taxonomies $taxonomies | Promoted from the constructor. |
| private | readonly 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)# | |
| method | termTaxonomies(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. |
| method | postTypes(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. |
| method | taxonomies(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/taxonomies (floor edit_posts)# | Every taxonomy with its counts. |
Internals 4
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | stamp(array $definition): string# | A definition's stamp, as Minn Admin makes it: a save sends it back as `base`, and a copy opened before someone else changed the definition is refused (409). Lists sorted, keys sorted, the escaped JSON's md5 cut to twelve characters.
| |||
| private | publicTypes(): array# | @return list<string> | |||
| private | termCount(string $taxonomy): int# | ||||
| private | postCount(string $type): int# |
Nothing matches.