Open wachterjohannes opened 4 years ago
For this who want to help bringing the bundle forward a ContentTypeResolver can be created by creating a service in Content/ContentTypeResolver/*
folder with the ContentTypeResolverInterface. And register this services with the sulu_headless.content_type_resolver Tag.
They should implement the same parameter which are supported by the sulu core content types which can be found using bin/console sulu:content:types:dump
command.
@alexander-schranz @wachterjohannes Are you sure that the Tag Selection needs its own resolver? I just wanted to take care of the topic and saw when testing that the tags are already output as a correct looking array. :D
"tags": [ "Test1", "Test2", "test" ]
@TheCadien Thank you. That's correct I did update the list.
Also did see that the single_category_selection
was not yet in the list that should be really straight forward by having a look at the exist CategorySelection.
@alexander-schranz I checked "location" works fine without own type resolver :)
@TheCadien Thank you!
@alexander-schranz seems the "route" content type is full working without any type resolver.
route-test: "/test-url"
Added the new image_map content type also to the todo list which is shipped with sulu 2.2.
Added also the new single_snippet_selection content type to the list which was added lately to the 2.x releases. Should be similar to the exist implemented snippet_selection
(#32) content resolver.
Thx to @luca-rath the teaser_selection
will be part of the next release #83
We got 2 new content types the single_collection_selection
and collection_selection
content type which should be implemented. They are here to provide only the collection data so response should look at current state something like:
{
"id": 1,
"key": null,
"title": "My Collection",
"description": "Description about the Media"
}
Added the new link
content type to the todo list :)
I take on the todo link
Link content type has been added here: https://github.com/sulu/SuluHeadlessBundle/pull/111
The missing smart content providers: account, contact, snippets and the collection and single collection selection were implemented.
Maybe the resolver for the single_form_selection
content type could be used from https://blog.bitexpert.de/blog/sulu_headless_form_data?
@Josef-Reichardt happy to contribute our "latest" iteration of that code snippet from our blog post if there's interest.
Core Content Types
To complete the list the following content types do not need an own resolver:
ArticleBundle Content Types
FormBundle Content Types