RegisteredPostFields final readonly class
Minn\Rest\RegisteredPostFields · public/minn/src/Minn/Rest/RegisteredPostFields.php · 89 lines
The REST object of a post whose type plugin code registered (probe rest-plugin-types), built by what the type supports.
Constants and properties
| private | readonly Minn\Content\Posts $posts | Promoted from the constructor. |
| private | readonly Minn\Front\Permalinks $permalinks | Promoted from the constructor. |
| private | readonly Minn\Rest\RestUrl $url | Promoted from the constructor. |
Public
| new | __construct(Minn\Content\Posts $posts, Minn\Front\Permalinks $permalinks, Minn\Rest\RestUrl $url)# | |||||||
| method | view(Minn\Content\PostRecord $p, Minn\Rest\RegisteredType $type, Closure $allow, Closure $gmt): array# | A plugin's type in the view context (probe rest-plugin-types): the shared fields, then only what the type supports (title, editor, excerpt, author, thumbnail, page attributes, comments, formats, custom fields), its parent when hierarchical, each REST taxonomy's term ids under its REST base, the class list and links.
@return array<string, mixed> |
Internals 1
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | links(Minn\Content\PostRecord $p, Minn\Rest\RegisteredType $type, int $featured, array $taxonomies, Closure $allow): array# |
|
Nothing matches.