Download the PHP package kami/booking-bundle without Composer
On this page you can find all versions of the php package kami/booking-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kami/booking-bundle
More information about kami/booking-bundle
Files in kami/booking-bundle
Package booking-bundle
Short Description Adds some booking functionality to your Symfony project
License MIT
Homepage https://github.com/kamilabs/BookingBundle
Informations about the package booking-bundle
KamiBookingBundle
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.
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 application. Just create following directory structure:
All versions of booking-bundle with dependencies
symfony/symfony Version >2.8
symfony/framework-bundle Version >2.8
twig/twig Version ~1.3
twig/extensions Version ~1.4
doctrine/orm Version ~2.5
doctrine/doctrine-bundle Version ~1.6