Download the PHP package carlescliment/calendar-bundle without Composer
On this page you can find all versions of the php package carlescliment/calendar-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download carlescliment/calendar-bundle
More information about carlescliment/calendar-bundle
Files in carlescliment/calendar-bundle
Package calendar-bundle
Short Description A bundle for handling events in calendar
License Apache-2.0
Homepage https://github.com/carlescliment/calendar-bundle
Informations about the package calendar-bundle
CalendarBundle
The CalendarBundle gives you a built-in calendar for managing events without relying on third-parties like Google. It comes with four different default views; agenda, by day, by week and by month. If you need greater customizations, you can use the bundle as a simple calendar API and build your own logic on it.
Installation
1. Update your vendors
Add this line to your composer.json
"require": {
"carlescliment/calendar-bundle": "dev-master"
}
Execute php composer.phar update carlescliment/calendar-bundle
2. Load the bundle in app/AppKernel.php
$bundles = array(
// ...
new BladeTester\CalendarBundle\BladeTesterCalendarBundle(),
);
3. Update your routing:
// ...
BladeTesterCalendarBundle:
resource: "@BladeTesterCalendarBundle/Resources/config/routing.yml"
prefix: /
4. Create your calendar bundle
Create a new bundle extending BladeTesterCalendarBundle
namespace Your\OwnCalendarBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class YourOwnCalendarBundle extends Bundle
{
public function getParent()
{
return 'BladeTesterCalendarBundle';
}
}
WARNING: If your bundle includes its own routing file, remember to delete it or completely override the parent bundle paths.
Add it to AppKernel.
5. Update the schema
6. Install the assets
Using the calendar
Go to http://www.example.com/calendar and enjoy :)
Customizing the bundle
If you want to override the bundle default views to use your design and markup, please follow the next steps.
1. Override the default base template
Copy the template in Resources/views/Base/base.html.twig
into your own bundle and modify it to extend your base template.
2. Add the assets to your base template
Note: remove the line including jquery if your template already includes it.
How to override the default entities
You can define your own entities. First, create your custom entity:
Then modify your app/config/config.yml
Extending the behaviour
It is easy to extend the behaviour of this bundle by using inheritance in your models and entities. If it is not enough, you can register listeners to the calendar events.
Pre-persist event
Dispatched whenever an item is about to be created in the database.
Post-add event
Dispatched after an item is added to the database.
Post-update event
Dispatched after an item is updated.
Testing
CalendarBundle contains unitary and functional tests. Download the bundle, create the database according to the travis.yml
file and configure the access settings in src/BladeTester/CalendarBundle/Tests/App/parameters.ini
. Run the following command:
Credits
- Author: Carles Climent (programming)
- Author: Marcos Calatayud (markup and design)
- Contributor: Doug Hayward (french translations, fixes)
- Contributor: Rubén Egiguren (basque translations)
- Contributor: Andrzej Jarzebowski (polish translations)
Contribute and feedback
Any feedback and contribution will be very appreciated.