Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

[WIP] first steps to an RESTController by the help of sylius resource-bundle #144

Closed
wants to merge 6 commits into from

Conversation

ElectricMaxxx
Copy link
Member

@ElectricMaxxx ElectricMaxxx commented May 3, 2016

This is a realy early WIP PR for the REST support of content bundle.

Todo's:

  • wait for routing support
  • POST to collection
  • DELETE with redirect to parent collection
  • PUT/PATCH

@dantleech
Copy link
Member

What advantages would this offer over the Resource[Rest]Bundle?

@ElectricMaxxx
Copy link
Member Author

ElectricMaxxx commented May 4, 2016

Sorry @dantleech I forgot to add the related Issue #93
The advantage is the other type of endpoint. WE have got enpoints (phpcr & phpcr-odm) which relates to the path of every possible document. This endpoint here relates to the url of a contents route.
Different Clients can work differently. One (admin, treebrowser) can work directly on the tree, other like FronendEditing can work directly on the route very close to the feeling of navigating through the html App.

But you are right in the point that we should put equal functions into one Place. So one toolset and both endpoints in two different places. I think i will see the common function when having implemented both, caus i started working on symfony-cmf/resource-rest-bundle#6 too

And you right again. I procastinate the writing of an "CMF - REST - the big picture " gist/post/idea since weeks.

cmf_rest:
dynamic:
enabled: true
crud_controller_by_method: cmf_content.rest_controller
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is my own little enhancer in my restbundle-try-and-fail-sandbox. It will be removed, when routing is ready to do the job.

"symfony/monolog-bundle": "^2.3",
"friendsofsymfony/rest-bundle": "^1.7",
"jms/serializer-bundle": "^0.13|^1.0",
"electricmaxxx/rest-bundle":"dev-master"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will be removed, when routing is ready to do its job.

@@ -0,0 +1,4 @@
cmf_static_content_index:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created for the redirect defintion after delete only. Should be done in a kind of an route enhancer to pass the information by class.

@ElectricMaxxx ElectricMaxxx changed the title [WIP] first steps to an RESTController with a kind of a model manager [WIP] first steps to an RESTController by the help of sylius resource-bundle May 29, 2016
/**
* @author Maximilian Berghoff <[email protected]>
*/
class RESTContentControllerTest extends BaseTestCase
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RestContent

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently not sure if i should switch to behat tests as you did on resource-rest-bundle. So maybe that test will disappear.

@ElectricMaxxx
Copy link
Member Author

i will maybe keep track localy, or replace it by api-plattform

@ElectricMaxxx ElectricMaxxx deleted the rest_support_complete branch May 16, 2018 03:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants