Symfony dynamic Entity selection in FormType

Symfony is fantastic for building very quick snappy applications; especially CRUD apps. However, sometimes we want to quickly alter the default CRUD forms with some business logic. For example, if we have Products and Categories and want to be able to create new product entities with a specified category but somehow restrict which categories are accessible in the product form.

Altering the FormType Class

Define the Form as a Service

Usage in a Controller



Introducing litwicki/chargify-bundle

This implementation leverages an object-oriented approach to replicating all of the entities available via the API. From there, each of the Model entities are manipulated with Handlers that allow full control of the entire API layer.

As of this post, v1 is the only integrated support, but v2 (Chargify Direct) is being developed as I write this.


Follow installation instructions on the repository README


Full Documentation

Full documentation can be found here: Litwicki Chargify Bundle Documentation

Releasing simple helper library and utilities

litwicki/common –

A set of helper functions and utilities with a wide variety of use.


  • cURL class


  • Several commonly used selection arrays for forms (month, year, country, state, etc)



Build an array of states, keyed by abbreviation:

Build a cURL object..