sulu-workshop icon indicating copy to clipboard operation
sulu-workshop copied to clipboard

08 - Add a custom entity Location

Open luca-rath opened this issue 4 years ago • 0 comments

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

luca-rath avatar Jul 07 '20 10:07 luca-rath