CalendR is an Object Oriented Calendar management library on top of PHP5.3+ Date objects. You can use it to deal with all your needs about calendars and events.
Complete documentation is available here.
CalendR is hosted on packagist, you can install it with composer.
Open a command console, enter your project directory and execute:
$ composer require jchr86/calendr
Enable the bundle by adding it to the list of registered bundles
in the config/bundles.php
file of your project:
// config/bundles.php
return [
// ...
CalendR\Bridge\Symfony\Bundle\CalendRBundle::class => ['all' => true],
];
// src/Repository/EventRepository.php
namespace App\Repository;
use App\Entity\Event;
use CalendR\Bridge\Doctrine\ORM\EventRepository;
use CalendR\Event\Provider\ProviderInterface;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Common\Persistence\ManagerRegistry;
use Doctrine\ORM\Query\Expr;
class EventRepository extends ServiceEntityRepository implements ProviderInterface
{
use EventRepository;
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Event::class);
}
}
// config/services.yaml
services:
App\Repository\EventRepository:
tags:
- { name: calendr.event_provider }
Calendar is open to contributions. Merging delays can vary depending to my free time, but always be welcome.
CalendR is licensed under the MIT License - see the LICENSE file for details