sulu-workshop
sulu-workshop copied to clipboard
08 - Add a custom entity Location
Add a custom entity Location
Goal
We are managing more and more events that take place at the same location. Because our content managers do not want to enter the same location information over and over again we would like to provide a central place for managing the locations of our events.
As this task is quite complex, we are going to break down the requirements into smaller pieces and multiple
assignments. In this assignment, we want to add a new Location
entity to our database model.
Steps
- Follow the symfony best practices to add a
Location
entity with the following properties:-
name
-
street
-
city
-
countryCode
-
- Don't forget to run
bin/adminconsole doctrine:schema:update --force
Hints
- Use
bin/adminconsole make:entity Location
- https://symfony.com/doc/current/doctrine.html#creating-an-entity-class
- Run
bin/adminconsole doctrine:schema:validate
More Information
This assignment is purely based on Symfony. No Sulu knowledge required ;-)
Links
- Next assignment pull request: 09 - Add a list representation for locations in the admin interface
- Source file of this assignment: assignments/08.md