Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing ContentType resolver #3

Open
49 of 50 tasks
wachterjohannes opened this issue Jan 28, 2020 · 17 comments
Open
49 of 50 tasks

Missing ContentType resolver #3

wachterjohannes opened this issue Jan 28, 2020 · 17 comments
Labels
Feature New functionality not yet included in the Bundle

Comments

@wachterjohannes
Copy link
Member

wachterjohannes commented Jan 28, 2020

Core Content Types

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

  • number
  • single_select
  • select
  • checkbox
  • color
  • time
  • date
  • email
  • url
  • location
  • password
  • phone
  • text_line
  • resource_locator
  • text_editor
  • text_area
  • tag_selection
  • route

ArticleBundle Content Types

FormBundle Content Types

  • form_selection
@wachterjohannes wachterjohannes added the Feature New functionality not yet included in the Bundle label Feb 27, 2020
@alexander-schranz
Copy link
Member

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
Copy link
Member

@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
Copy link
Member

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

@alexander-schranz
Copy link
Member

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
Copy link
Member

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

@alexander-schranz
Copy link
Member

@TheCadien Thank you!

@TheCadien
Copy link
Member

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

route-test: "/test-url"

@alexander-schranz
Copy link
Member

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

@alexander-schranz
Copy link
Member

alexander-schranz commented Nov 19, 2020

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
Copy link
Member

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

@alexander-schranz
Copy link
Member

alexander-schranz commented Sep 13, 2021

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
Copy link
Member

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

@alexander-schranz alexander-schranz pinned this issue Dec 16, 2021
@TheCadien
Copy link
Member

I take on the todo link

@alexander-schranz
Copy link
Member

Link content type has been added here: #111

@alexander-schranz
Copy link
Member

alexander-schranz commented Sep 17, 2022

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

@Josef-Reichardt
Copy link

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

@shochdoerfer
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New functionality not yet included in the Bundle
Projects
None yet
Development

No branches or pull requests

5 participants