You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I did everything as in instruction, but i get:
"Catchable Fatal Error: Argument 1 passed to Ent\AppBundle\Listener\LoadDataListener::loadData() must be an instance of Ent\AppBundle\Listener\CalendarEvent, instance of AncaRebeca\FullCalendarBundle\Event\CalendarEvent given"
Sorry for the delay @jacekpcmaniak .
It looks like your listener class has loadData function has the wrong data type parameter ($calendarEvent). You have to set AncaRebeca\FullCalendarBundle\Event\CalendarEvent If you want to use type hinting, not Ent\AppBundle\Listener\CalendarEvent.
Activity
ibrasdev commentedon Jan 11, 2018
did u solve that i have the same problem
ancarebeca commentedon Jan 14, 2018
Sorry for the delay @jacekpcmaniak .
It looks like your listener class has
loadDatafunction has the wrong data type parameter ($calendarEvent). You have to setAncaRebeca\FullCalendarBundle\Event\CalendarEventIf you want to use type hinting, notEnt\AppBundle\Listener\CalendarEvent.Have a look at
FullCalendarBundle/Service/Calendar.php
Lines 40 to 43 in 12096b8
loadDatafunction needs to receive the same class thatCalendar.phpis dispatchingYou also have an example here https://github.com/ancarebeca/full-calendar-example/blob/master/src/AppBundle/EventListener/LoadDataListener.php
cc: @ibrasdev