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

06 - Add an event registration to the website #11

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

Conversation

luca-rath
Copy link
Contributor

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

Allow for event registration on the website

Goal

We want to allow our users to register themselves for our events in the future. Therefore we need to display a
register form that includes input fields for a email address, a first and last name on each event detail page.

Steps

  • Follow the symfony best practices to add a new EventRegistration entity
  • Add a many-to-one association between the Event entity and your newly created EventRegistration entity
  • Don't forget to update your database schema with bin/adminconsole doctrine:schema:update --force
  • Follow the symfony best practices to add a new EventRegistration form type
  • Persist submitted registrations in your src/Controller/Website/EventWebsiteController.php
  • Output your form and a success message in your templates/events/index.html.twig
  • Browse one of your events and register yourself

Hints

More Information

This assignment is purely based on Symfony. No Sulu knowledge required ;-)

Links

@alexander-schranz alexander-schranz added the assignment Pull request for a assignment solution label Sep 23, 2020
@niklasnatter niklasnatter force-pushed the assignment/06 branch 2 times, most recently from 5461949 to 47d95c8 Compare October 21, 2020 09:32
@niklasnatter niklasnatter force-pushed the assignment/06 branch 2 times, most recently from 159ee52 to e39eeec Compare October 23, 2020 11:30
@niklasnatter niklasnatter force-pushed the assignment/06 branch 2 times, most recently from d5633e9 to eda2c4f Compare February 16, 2021 14:23
@sebheitzmann
Copy link

Hi,

beautifull documentation as PR. Very usefull.
But I think that the reference to the new controller is missing in the config/templates/pages/event_overview.xml
If not i missed something.

@luca-rath
Copy link
Contributor Author

Hi and thanks for your feedback! 🙂

The EventWebsiteController is not used for the event overview, it's used for the event detail page. There is a custom route defined in config/routes_website.yaml

@Wonko52
Copy link

Wonko52 commented Apr 23, 2022

Hi, great tutorial!

I think under Hints it should be
bin/adminconsole make:form EventRegistraionType EventRegistration
instead of EventType Event

and src/Controller/EventWebsiteController.php is located under src/Controller/Website/EventWebsiteController.php

@alexander-schranz
Copy link
Member

@Wonko52 Thank you I updated the description!

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.

5 participants