Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

SymfonyCasts

Starting in Symfony2: Course 3 (2.4+)

via SymfonyCasts

Overview

Welcome back for part 3 of our Starting in Symfony2 series! In part 3 of this series, we're going to discover even more about Symfony and begin to learn more about how Symfony really works under the hood. Over the next hour or so, we're going to learn what a service is, find out more about the core Symfony services, and create a few of our own. In Doctrine, we'll create some Doctrine associations, including ManyToOne and ManyToMany relationships. We'll also talk about lifecycle callbacks and event listeners. Plus a ton more!

Highlights:

  • Doctrine relations, metadata, and the JoinColumn
  • ManyToMany relationship that's bidirectional, owning versus inverse side and why that matters
  • Loading fixtures with shared data
  • Creating shortcuts with your very own base controller!
  • Doctrine extensions: timestampable, sluggable
  • Ajax: returning Json from a controller, setting the content type and the _format parameter
  • Customizing error pages at the template and controller level
  • Overriding bundle templates
  • Embedding other controllers with Twig's render tag
  • Services! What they are, where to find and use the core services, and a step-by-step on how to create your own. Also, demystifying dependency injection.
  • Creating your very own Twig extension
  • Doctrine lifecycle callbacks and how to create and leverage your own doctrine event listener service

Syllabus

  • Introduction
  • ManyToOne Doctrine Relationships
  • Sharing Data between Fixture Classes
  • Restricting Edit Access to Owners
  • Using a shortcut Base Controller Class
  • Using PHPDoc for Auto-Completion
  • OneToMany: The Inverse Side of a Relationship
  • Doctrine Extensions: Sluggable and Timestampable
  • Using the slug in the Event URL
  • Adding createdAt and updatedAt Timestampable Fields
  • Creating a Custom orderBy Query
  • ManyToMany Relationship
  • Using the ManyToMany so Users can Attend an Event
  • More with ManyToMany: Avoiding Duplicates
  • JSON up in your Response
  • Come on, Set the Content-Type Header!
  • Adding the AJAX Touch: JavaScript
  • Customizing Error Pages and How Errors are Handled
  • Render another Controller in Twig
  • Creating a Pretty CSV Download
  • Your Very First Service
  • Symfony Overlord: The Service Container
  • Configuration Loading and Type-Hinting
  • Dependency Inject All the Things
  • Twig Extensions and Dependency Injection Tags
  • Doctrine is in your Lifecycle (with Callbacks)
  • Doctrine Event Listeners
  • Doctrine Listeners on Update
  • Keep Going!

Taught by

Ryan Weaver and Leanna Pelham

Reviews

Start your review of Starting in Symfony2: Course 3 (2.4+)

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.