adesigns/calendar-bundle

I didnt get events of Full Calendar Bundle

Closed this issue · 1 comments

m4ru commented

Hi,

I saw many subject about this and i'm really desperate about make this function. I hope this is a little issue and you'll see in a second because i'm quite stuck.

My calendar is loading without problem, i see in firebug, the fc-load-event functions loading without problems but the response is empty i have no events on my calendar.
Here are content of my file

app/config/config.yml :
services:
ptrav.docadm.calendar_listener:
class: PTrav\CalendrierBundle\EventListener\CalendarEventListener
tags:
- { name: kernel.event_listener, event: calendar.load_events method: loadEvents }
arguments: ['@doctrine.orm.entity_manager']
app/config/routing.yml :
fos_js_routing:
resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml"

PTrav\CalendrierBundle\EventListener\CalendarEventListener:

entityManager = $entityManager; } public function loadEvents(CalendarEvent $calendarEvent) { $startDate = $calendarEvent->getStartDatetime(); $endDate = $calendarEvent->getEndDatetime(); // i simplified the event $eventEntity = new EventEntity("Title Oh yeah", $startDate,$endDate,false); //optional calendar event settings $eventEntity->setAllDay(true); // default is false, set to true if this is an all day event $eventEntity->setBgColor('#FF0000'); //set the background color of the event's label $eventEntity->setFgColor('#FFFFFF'); //set the foreground color of the event's label $eventEntity->setUrl('http://www.google.com'); // url to send user to when event label is clicked $eventEntity->setCssClass('my-custom-class'); // a custom class you may want to apply to event labels //finally, add the event to the CalendarEvent for displaying on the calendar $calendarEvent->addEvent($eventEntity); } ``` } ?>

Part of my main layout :
{# FOSJsRouting #}
<script src="{{ asset('bundles/fosjsrouting/js/router.js') }}"></script>
<script src="{{ path('fos_js_routing_js', {"callback": "fos.Router.setData"}) }}"></script>

{# calendar #}
<script type="text/javascript" src="{{ asset('bundles/adesignscalendar/js/jquery/jquery-1.8.2.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('bundles/adesignscalendar/js/fullcalendar/jquery.fullcalendar.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('bundles/adesignscalendar/js/calendar-settings.js') }}"></script>

Part of the view :
{% include 'ADesignsCalendarBundle::calendar.html.twig' %}

Thanks in advance !

My guess is that this is a configuration issue, and has been resolved since then?