sulu / SuluHeadlessBundle

Bundle that provides controllers and services for using Sulu as headless content management system
MIT License
48 stars 25 forks source link

Missing ContentType resolver #3

Open wachterjohannes opened 4 years ago

wachterjohannes commented 4 years ago

Core Content Types

To complete the list the following content types do not need an own resolver:

ArticleBundle Content Types

FormBundle Content Types

alexander-schranz commented 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.

TheCadien commented 4 years ago

@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" ]

alexander-schranz commented 4 years ago

@TheCadien Thank you. That's correct I did update the list.

alexander-schranz commented 4 years ago

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.

TheCadien commented 4 years ago

@alexander-schranz I checked "location" works fine without own type resolver :)

alexander-schranz commented 4 years ago

@TheCadien Thank you!

TheCadien commented 4 years ago

@alexander-schranz seems the "route" content type is full working without any type resolver.

route-test: "/test-url"

alexander-schranz commented 4 years ago

Added the new image_map content type also to the todo list which is shipped with sulu 2.2.

alexander-schranz commented 4 years ago

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.

alexander-schranz commented 3 years ago

Thx to @luca-rath the teaser_selection will be part of the next release #83

alexander-schranz commented 3 years ago

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"
}
alexander-schranz commented 2 years ago

Added the new link content type to the todo list :)

TheCadien commented 2 years ago

I take on the todo link

alexander-schranz commented 2 years ago

Link content type has been added here: https://github.com/sulu/SuluHeadlessBundle/pull/111

alexander-schranz commented 2 years ago

The missing smart content providers: account, contact, snippets and the collection and single collection selection were implemented.

Josef-Reichardt commented 10 months ago

Maybe the resolver for the single_form_selection content type could be used from https://blog.bitexpert.de/blog/sulu_headless_form_data?

shochdoerfer commented 8 months ago

@Josef-Reichardt happy to contribute our "latest" iteration of that code snippet from our blog post if there's interest.