This part of the tutorial is based on the results of the previous blog-post.
In this part we are going to integrate a “News” endpoint in the API of Sulu. We will develop the following parts:
- RestController - delivers data in a JSON-serialized format.
- NewsManager - encapsulates the CRUD operations to interact with “News” items.
- NewsEntity - a simple Doctrine entity which will be stored in the database.
For the rest of this tutorial we will use this Doctrine mapping file. It contains an id, the content and the title. This example is very basic but it can be extended for your needs.