NavigationController final readonly class
Minn\Rest\NavigationController · public/minn/src/Minn/Rest/NavigationController.php · 48 lines
wp/v2/navigation: the block theme's navigation menus, stored as wp_navigation posts. The reading and writing is the posts machinery with this type's own capabilities (every one of them edit_theme_options), so only the routes live here.
Uses 10
Used by 1
Constants and properties
| private | TYPE = 'wp_navigation' | |
| private | BASE = 'navigation' | |
| private | readonly Minn\Rest\PostsController $reads | Promoted from the constructor. |
| private | readonly Minn\Rest\PostsWriteController $writes | Promoted from the constructor. |
Public
| new | __construct(Minn\Rest\PostsController $reads, Minn\Rest\PostsWriteController $writes)# | |
| method | list(Minn\Http\Request $request): Minn\Http\ResponseGET /wp/v2/navigation (public)# | The navigation posts. |
| method | single(Minn\Http\Request $request, string $id): Minn\Http\ResponseGET /wp/v2/navigation/{id:[\d]+} (public; navigation {id} must exist)# | One navigation post. |
| method | create(Minn\Http\Request $request): Minn\Http\ResponsePOST /wp/v2/navigation# | Creates a navigation post. |
| method | update(Minn\Http\Request $request, string $id): Minn\Http\ResponsePOST /wp/v2/navigation/{id:[\d]+} (cap edit_post on {id}; navigation {id} must exist)PUT /wp/v2/navigation/{id:[\d]+} (cap edit_post on {id}; navigation {id} must exist)PATCH /wp/v2/navigation/{id:[\d]+} (cap edit_post on {id}; navigation {id} must exist)# | Updates a navigation post. |
| method | delete(Minn\Http\Request $request, string $id): Minn\Http\ResponseDELETE /wp/v2/navigation/{id:[\d]+} (cap delete_post on {id}; navigation {id} must exist)# | Trashes or deletes a navigation post. |
Nothing matches.