Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

07 - Display the registrations for each event in the admin interface #12

Open
wants to merge 1 commit into
base: assignment/06
Choose a base branch
from

Conversation

luca-rath
Copy link
Contributor

@luca-rath luca-rath commented Jul 7, 2020

Display submitted event registrations in the admin interface

Goal

Our event managers need to keep track of all the incoming event registrations. Therefore we want to display a list
of all registrations for each of our events in the admin interface.

Steps

  • Create a new admin API-Controller App\Controller\Admin\EventRegistrationController to query event-registrations
  • Register the controller in your config/routes_admin.yaml
  • Configure a new event_registrations resource in your config/packages/sulu_admin.yaml
  • Add a new list configuration for event_registrations in a config/lists/event_registrations.xml
  • Use the ListRouteBuilder to add a new admin route in your src/Admin/EventAdmin.php
  • Log into the admin UI with user "admin" and password "admin"
  • Navigate to the event you registered yourself in the previous assignment and see your submitted values

Hints

  • Have a look at the admin API-Controller App\Controller\Admin\EventController for the Event entity
  • Have a look at the existing list configuration config/lists/events.xml for the Event entity
  • Have a look at the existing admin-routes for the Event entity in src/Admin/AppAdmin.php file

More Information

The Admin classes are used to configure available navigation items and routes in the Sulu administration interface.
Each route is associated to a javascript view and can customize the behaviour of the view by passing options to the
view. Sulu is shipped with several configurable javascript views, including a flexible form view and a list view.

The Sulu administration interface is implemented as a single-page application with React. It requires a standardized
REST API for loading and manipulating the different resources available in the system. For custom entities you need to
implement this REST endpoint by yourself.

Passing your REST API URLs to to each view of the JS application would be quite inconvenient. Therefore, Sulu utilizes
a concept called resources that associates entity specific API URLs used by the JS application to a unique resourceKey.
This resource key is then used to configure entity specific views of the JS application.

Another concept of the Sulu frontend application is the utilization of metadata when rendering javascript views. For
example, the list view utilizes metadata that is configured in XML files to determine the available columns and the
type of the data inside of these columns. This concepts enables the developer to built feature-rich UIs without the
need of writing javascript code.

Links

@alexander-schranz alexander-schranz added the assignment Pull request for a assignment solution label Sep 23, 2020
@niklasnatter niklasnatter force-pushed the assignment/07 branch 2 times, most recently from 70dda22 to aa37348 Compare September 23, 2020 10:47
@niklasnatter niklasnatter force-pushed the assignment/07 branch 6 times, most recently from 62cab3f to cb3a102 Compare October 23, 2020 09:16
@niklasnatter niklasnatter force-pushed the assignment/07 branch 2 times, most recently from ab4aa3f to a055186 Compare February 16, 2021 14:15
@niklasnatter niklasnatter force-pushed the assignment/07 branch 2 times, most recently from 75f3ced to b67296b Compare May 27, 2021 13:01
@niklasnatter niklasnatter force-pushed the assignment/07 branch 2 times, most recently from 31d532e to b165370 Compare June 22, 2021 08:57
@niklasnatter niklasnatter force-pushed the assignment/07 branch 2 times, most recently from 8743286 to d2ce609 Compare June 20, 2022 20:06
@niklasnatter niklasnatter force-pushed the assignment/07 branch 2 times, most recently from 906becf to 25fee79 Compare June 20, 2022 20:53
@niklasnatter niklasnatter force-pushed the assignment/07 branch 2 times, most recently from bab0d28 to 23c93cb Compare June 20, 2022 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assignment Pull request for a assignment solution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants