I am implementing FullCalendarBundle into Symfony 3.4 but I am struggling to load data into calendar. The calendar works fine but I cannot see my own event.
I did read the documentation and now I am trying to get an inspiration from example.
The data I am loading is the Event entity with title and date.
I made this listener based on documentation and example:
LoadDataListener.php
namespace AppBundle\Listener;
use AncaRebeca\FullCalendarBundle\Event\CalendarEvent as BundleCalendarEvent;
use AncaRebeca\FullCalendarBundle\Model\Event as BundleEvent;
use AppBundle\Entity\Event as MyEvent;
class LoadDataListener
{
public function loadData(MyEvent $event, BundleCalendarEvent $calendarEvent)
{
$calendarEvent->addEvent(new BundleEvent($event->getName(), $event->getDateTime()));
}
}
and than I load the data to calendar with:
$loading = new LoadDataListener();
$loading->loadData($event, new CalendarEvent($event->getDateTime(), $event->getDateTime(), array()));
If I understand it correctly, here is the part where I can set up the method how to load the events (fullcalendar.default-settings.js).
I am implementing FullCalendarBundle into Symfony 3.4 but I am struggling to load data into calendar. The calendar works fine but I cannot see my own event.
I did read the documentation and now I am trying to get an inspiration from example.
The data I am loading is the Event entity with title and date.
I made this listener based on documentation and example:
LoadDataListener.php
and than I load the data to calendar with:
If I understand it correctly, here is the part where I can set up the method how to load the events (fullcalendar.default-settings.js).
Thanks a lot for any idea.