The Typo3 Extension “csevents”

The Typo3 extension csevents was developed “quick and dirty” some years ago based on a Typo3 V3.8 installation. It’s the goal of this project to refactor this extension to the extbase and fluid framework using Test Driven Development.

To let you understand some of the details of this blog, you need to have a rough overview of the current features and the domain model of this extension.

Rough Overview / Storyboard

To explain the basic requirements of this extension, I will use a storyboard how this extension is used. Let’s think of a theatre or cinema. The theatre provides some plays (e.g. “Hamlet” and “Faust”) repeated on several days. They need to show the schedule on their website and they want to provide an online booking as well, thus they need to inform about prices and available places/cards as well.

The manager of the theatre uses the Typo3 backend to name a new play (“Hamlet”) and to describe its content. Afterwards he wants to choose the price for a card from a set of predefined price categories (per play, not per seat!). According to the play’s content he also chooses a category (like “Drama”) out of a list of predefined categories. When he is finished with this, he sets up a set of appointments like a playlist to define, on which days the play is performed in the theatre.

The frontend user sees a playlist for a certain month. He can choose / filter by the categories and select a certain appointment. He wants to do online booking for this appointment and of course he wants to read some detailed information about the play and the price in advance.

When a lot of bookings are done, the manager might want to publish the number of seats/cards still available or he/she wants to mark the appointment as “sold out”, thus no online booking is available any more.

Wording / The Domain Model

ModelThe different plays (“Hamlet” and “Faust”) are called “event” in this business model. For each event there is a description giving information about the title (“Hamlet”), a describing long text, an image, a price and a category (like “Drama”, “Science Fiction” etc.). The category has just a title. A price can have a regular/normal price and a reduced price (e.g. for children). Prices are stored in a standard price object, because a theatre usually has got a set of predefined prices for all plays, thus you don’t need to re-define the prices each time you setup a new description.

Last but not least each description has got a set of several appointments which define the repeated scheduling of the events. An appointment has got a link to it’s description and some additional information like “Seats available”, “sold out” and an internal ID for the listing in the backend. Additionally the event manager can setup a specific price different from the stored standard prices for a specific appointment (e.g. if “Hamlet” is more expensive on Dec. 31st).

Leave a Reply