PHPackages                             carlescliment/calendar-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. carlescliment/calendar-bundle

ActiveSymfony-bundle

carlescliment/calendar-bundle
=============================

A bundle for handling events in calendar

2.5.3(10y ago)4018.6k16[6 issues](https://github.com/carlescliment/calendar-bundle/issues)[3 PRs](https://github.com/carlescliment/calendar-bundle/pulls)Apache-2.0PHPPHP &gt;=5.3.2

Since Apr 24Pushed 9y ago6 watchersCompare

[ Source](https://github.com/carlescliment/calendar-bundle)[ Packagist](https://packagist.org/packages/carlescliment/calendar-bundle)[ Docs](https://github.com/carlescliment/calendar-bundle)[ RSS](/packages/carlescliment-calendar-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (14)Used By (0)

CalendarBundle
==============

[](#calendarbundle)

[![Build Status](https://camo.githubusercontent.com/de3754771536e5d6bf5c8d180c7cd78b37abcb55769b7b87a0b115789e898465/68747470733a2f2f7472617669732d63692e6f72672f6361726c6573636c696d656e742f63616c656e6461722d62756e646c652e706e67)](https://travis-ci.org/carlescliment/calendar-bundle)

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
------------

[](#installation)

### 1. Update your vendors

[](#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`

[](#2-load-the-bundle-in-appappkernelphp)

```
$bundles = array(
    // ...
    new BladeTester\CalendarBundle\BladeTesterCalendarBundle(),
);

```

### 3. Update your routing:

[](#3-update-your-routing)

```
// ...

BladeTesterCalendarBundle:
    resource: "@BladeTesterCalendarBundle/Resources/config/routing.yml"
    prefix:   /

```

### 4. Create your calendar bundle

[](#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.

```
    $bundles = array(
        // ...
        new Your\OwnCalendarBundle\YourOwnCalendarBundle(),
    );

```

### 5. Update the schema

[](#5-update-the-schema)

```
php app/console doctrine:schema:update --force

```

### 6. Install the assets

[](#6-install-the-assets)

```
php app/console assets:install

```

Using the calendar
------------------

[](#using-the-calendar)

Go to  and enjoy :)

Customizing the bundle
----------------------

[](#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

[](#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

[](#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

[](#how-to-override-the-default-entities)

You can define your own entities. First, create your custom entity:

```
namespace Your\OwnCalendarBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use BladeTester\CalendarBundle\Entity\Event as BaseEvent;

/**
 * @ORM\Entity(repositoryClass="BladeTester\CalendarBundle\Repository\EventRepository")
 * @ORM\Table(name="events")
 */
class Event extends BaseEvent
{
  // ... your implementation goes here
}

```

Then modify your `app/config/config.yml`

```
    blade_tester_calendar:
        driver: doctrine/orm
        engine: twig
        classes:
            event:
                entity: Your\OwnBundle\Entity\Event
            category:
                entity: Your\OwnBundle\Entity\EventCategory

```

Extending the behaviour
-----------------------

[](#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

[](#pre-persist-event)

Dispatched whenever an item is about to be created in the database.

```
    your_own_calendar_listener:
        class: Your\OwnCalendarBundle\Event\CalendarListener
        tags:
          - { name: kernel.event_listener, event: calendar.pre-persist, method: onPrePersist }

```

```
namespace Your\OwnCalendarBundle\Event;

use BladeTester\CalendarBundle\Event\CalendarEvent;

class CalendarListener {

    public function onPrePersist(CalendarEvent $event) {
        $event_model = $event->getEvent();
        // do whatever with the object before persisting it.
    }
}
```

### Post-add event

[](#post-add-event)

Dispatched after an item is added to the database.

```
    your_own_calendar_listener:
        class: Your\OwnCalendarBundle\Event\CalendarListener
        tags:
          - { name: kernel.event_listener, event: calendar.post-add, method: onPostAdd }

```

### Post-update event

[](#post-update-event)

Dispatched after an item is updated.

```
    your_own_calendar_listener:
        class: Your\OwnCalendarBundle\Event\CalendarListener
        tags:
          - { name: kernel.event_listener, event: calendar.post-update, method: onPostUpdate }

```

Testing
-------

[](#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:

```
cd /path/to/calendar-bundle
composer update
php vendor/bin/phpunit

```

Credits
-------

[](#credits)

- Author: [Carles Climent](https://github.com/carlescliment) (programming)
- Author: [Marcos Calatayud](http://www.linkedin.com/profile/view?id=48458010) (markup and design)
- Contributor: [Doug Hayward](http://github.com/BonnieDoug) (french translations, fixes)
- Contributor: [Rubén Egiguren](https://github.com/keopx) (basque translations)
- Contributor: [Andrzej Jarzebowski](https://github.com/8draco8) (polish translations)

Contribute and feedback
-----------------------

[](#contribute-and-feedback)

Any feedback and contribution will be very appreciated.

###  Health Score

37

—

LowBetter than 82% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 93.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~153 days

Recently: every ~185 days

Total

8

Last Release

3692d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c2a85fbd3df7cb8270d08d62ca42ba012b02cad5ff2a146dcc544ca658f92689?d=identicon)[carlescliment](/maintainers/carlescliment)

---

Top Contributors

[![carlescliment](https://avatars.githubusercontent.com/u/1255401?v=4)](https://github.com/carlescliment "carlescliment (187 commits)")[![DougHayward](https://avatars.githubusercontent.com/u/4302775?v=4)](https://github.com/DougHayward "DougHayward (6 commits)")[![keopx](https://avatars.githubusercontent.com/u/537583?v=4)](https://github.com/keopx "keopx (2 commits)")[![kerro](https://avatars.githubusercontent.com/u/14033920?v=4)](https://github.com/kerro "kerro (2 commits)")[![alexdrupal](https://avatars.githubusercontent.com/u/38625?v=4)](https://github.com/alexdrupal "alexdrupal (1 commits)")[![ajarzebowski](https://avatars.githubusercontent.com/u/4219825?v=4)](https://github.com/ajarzebowski "ajarzebowski (1 commits)")[![joanlouis](https://avatars.githubusercontent.com/u/4041840?v=4)](https://github.com/joanlouis "joanlouis (1 commits)")

---

Tags

eventscalendar

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/carlescliment-calendar-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/carlescliment-calendar-bundle/health.svg)](https://phpackages.com/packages/carlescliment-calendar-bundle)
```

###  Alternatives

[yohang/calendr

Object Oriented calendar management

465614.1k3](/packages/yohang-calendr)[unclecheese/eventcalendar

Event Calendar for the SilverStripe CMS

3215.2k8](/packages/unclecheese-eventcalendar)[dereuromark/cakephp-calendar

A CakePHP plugin to easily create calendars.

1646.8k1](/packages/dereuromark-cakephp-calendar)[silverstripe/event-calendar

Event Calendar for the SilverStripe CMS

318.5k3](/packages/silverstripe-event-calendar)[calendart/calendart

Manage remote calendars through an unified api

1920.1k2](/packages/calendart-calendart)[webbinaro/flarum-calendar

Adds a calendar of events created by users

177.8k](/packages/webbinaro-flarum-calendar)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
