PHP code example of jchr86 / calendr

1. Go to this page and download the library: Download jchr86/calendr library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jchr86 / calendr example snippets


// 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);
    }
}