DeclaredTermsController final readonly class
Minn\Rest\DeclaredTermsController · public/minn/src/Minn/Rest/DeclaredTermsController.php · 43 lines
wp/v2/{rest_base} for the taxonomies plugin code registers to show in REST (probe rest-plugin-types), answered as the core taxonomies are. Registered after the declared post types; a base no such taxonomy names declines, so a plugin's own route under wp/v2 is not shadowed.
Uses 8
Used by 1
Constants and properties
| private | readonly Minn\Rest\TermsController $terms | Promoted from the constructor. |
Public
| new | __construct(Minn\Rest\TermsController $terms)# | |
| method | list(Minn\Http\Request $request, string $base): Minn\Http\ResponseGET /wp/v2/{base:[a-z0-9_-]+} (registered taxonomy {base})# | A registered taxonomy's terms. |
| method | single(Minn\Http\Request $request, string $base, string $id): Minn\Http\ResponseGET /wp/v2/{base:[a-z0-9_-]+}/{id:[\d]+} (registered taxonomy {base})# | One term of a registered taxonomy. |
| method | create(Minn\Http\Request $request, string $base): Minn\Http\ResponsePOST /wp/v2/{base:[a-z0-9_-]+} (registered taxonomy {base})# | Creates a term in a registered taxonomy. |
| method | update(Minn\Http\Request $request, string $base, string $id): Minn\Http\ResponsePOST /wp/v2/{base:[a-z0-9_-]+}/{id:[\d]+} (registered taxonomy {base})PUT /wp/v2/{base:[a-z0-9_-]+}/{id:[\d]+} (registered taxonomy {base})PATCH /wp/v2/{base:[a-z0-9_-]+}/{id:[\d]+} (registered taxonomy {base})# | Updates a term of a registered taxonomy. |
| method | delete(Minn\Http\Request $request, string $base, string $id): Minn\Http\ResponseDELETE /wp/v2/{base:[a-z0-9_-]+}/{id:[\d]+} (registered taxonomy {base})# | Deletes a term of a registered taxonomy. |
Nothing matches.