sulu-workshop
sulu-workshop copied to clipboard
10 - Add a form to add, edit or delete locations in the admin interface
Add a form to add, edit or delete locations in the admin interface
Goal
We have already added a list that display existing locations in the last assignment. To complete our location management functionality, we want to implement a form that allows to add, edit and delete locations via the Sulu administration interface.
Steps
- Add the logic for adding, modifying and deleting locations to your
App\Controller\Admin\LocationController
- Configure the detail route for the
locations
resource in yourconfig/packages/sulu_admin.yaml
- Add a form-configuration for
location_details
in aconfig/forms/location_details.xml
file - Add admin routes for adding and editing locations in your
src\Admin\LocationAdmin
- Log into the admin UI with user "admin" and password "admin"
- Navigate to the locations list and add a new location
Hints
- Have a look at the admin API-Controller
App\Controller\Admin\EventController
for the Event entity - Have a look at the existing admin-routes for the Event entity in
src/Admin/AppAdmin.php
file
More Information
Have a look at assignment 07 for more information.
Links
- Next assignment pull request: 11 - Add a relation between events and locations
- Source file of this assignment: assignments/10.md