PHP code example of janborg / contao-ical-bundle

1. Go to this page and download the library: Download janborg/contao-ical-bundle 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/ */

    

janborg / contao-ical-bundle example snippets




namespace App\EventListener;

use Contao\CalendarEventsModel;
use Contao\CoreBundle\DependencyInjection\Attribute\AsHook;
use Kigkonsult\Icalcreator\Vevent;

#[AsHook('editVEvent')]
class EditVEventListener
{
    public function __invoke(Vevent $vEvent, CalendarEventsModel $objEvent): Vevent
    {
        // Add additional data or modify $vEvent …

        return $vEvent;
    }
}