Download the PHP package slad/slad-booking-bundle without Composer
On this page you can find all versions of the php package slad/slad-booking-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download slad/slad-booking-bundle
More information about slad/slad-booking-bundle
Files in slad/slad-booking-bundle
Package slad-booking-bundle
Short Description Adds some booking functionality to your Symfony 2 project
License MIT
Homepage https://github.com/stephylee/SladBookingBundle.git
Informations about the package slad-booking-bundle
SladBookingBundle
this project is forked from melifaro/melifaro-booking-bundle Changes will be made to match with car rental business
Booking Bundle for Symfony 2 Applications. Bundle provides some useful functionality for handling bookings on your website.
Installation
1. Download
Prefered way to install this bundle is using composer
Download the bundle:
2. Add it to your Kernel:
3. Create your entity
Doctrine ORM
Bundle has all necessary mappings for your entity. Just create your entity class and extend it from , create your field and setup proper relation for item you want to be booked.
4. Configure the booking bundle in config.yml
Now we are ready to rock!
Booker Service
Core component of this bundle is booker service. You can get it in your controller by using
Booker Service has following methods:
Checks is your item available for period, returns
Checks is your item available for date, returns
Updates your and returns the same object with added join and where clause.
Note: is
Updates your and returns the same object with added join and where clause.
Note: is
Books your item returns ( on success, on failure)
Calendar Twig Extension
Bundle also provides cool Twig extension. To use it in your template just try following:
Where
-
is object of your bookable item
-
is any date allowed for
- number of months to be rendered after desired date
-
Overriding template
Template can be overridden as usual in Symfony 2 application. Just create following directory structure:
All versions of slad-booking-bundle with dependencies
symfony/finder Version ~2.3
symfony/filesystem Version ~2.3
symfony/options-resolver Version ~2.3
symfony/framework-bundle Version ~2.3
symfony/twig-bundle Version ~2.3
symfony/browser-kit Version ~2.3
twig/twig Version ~1.5
twig/extensions Version ~1.0
doctrine/orm Version >=2.3
doctrine/doctrine-bundle Version ~1.1