Hi,
The old Calendar emitted several hooks that were very handy to catch in a custom app, but the new Calendar app (>= ownCloud 9) is missing them.
How can I add these hooks to the code of the new app ?
In the old app it was located in apps/calendar/lib/calendar.php and apps/calendar/lib/object.php :
OCP\Util::emitHook('OC_Calendar', 'addCalendar', $insertid); OCP\Util::emitHook('OC_Calendar', 'editCalendar', $id); OCP\Util::emitHook('OC_Calendar', 'deleteCalendar', $id); OCP\Util::emitHook('OC_Calendar', 'addEvent', $id); OCP\Util::emitHook('OC_Calendar', 'editEvent', $id); OCP\Util::emitHook('OC_Calendar', 'deleteEvent', $id);
...
I found two files in the new calendar app that could be the triggering sources, but I don’t know how they are connected and which one is the best choice :
businesslayer/objectbusinesslayer.php controller/objectcontroller.php
and :
businesslayer/calendarbusinesslayer.php controller/calendarcontroller.php
Could you explain to me the logic between these files (controller / businesslayer), and/or indicate the best “emit place” to create these hooks in the Calendar app ?
Also, I suppose that it will work when the calendar is used with an external software, using CalDAV ?
By the way, do you know why these hooks were removed from the new app ?