Archived video

This video is archived and won't be updated. We're keeping it online for now as a courtesy.

Alternate resources: 

Generate CRUD Code with Doctrine

Video loading...

Transcript language code: 

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:03
    with Leanna Pelham
  • 0:08
    I feel like making someone else do
  • 0:10
    some work for a while, so let's look at Symfony's code generation tools.
  • 0:15
    The first thing we need our app to do
  • 0:17
    is let users create, view, update, and delete events.
  • 0:21
    In other words, we need a CRUD for the event entity.
  • 0:25
    Want to use Doctrine to generate a CRUD?
  • 0:27
    Yeah, there's a Console command for that, doctrine:generate:crud.
  • 0:31
    This inquisitive command first wants to know
  • 0:34
    which entity we need a CRUD for.
Loading ...

Generate CRUD Code with Doctrine


Now that we have an event page, we need our app to let users create, view, update and delete events. In other words, we need a CRUD for the Event entity. We can use Doctrine to generate a CRUD for us, but when it does that we need to clean a few things up since we've already been doing work in there. We'll also take a look at how to tighten up the generated code.

Log in or sign up to download companion files.
Additional resources: