adesigns / calendar-bundle

This bundle allows you to integrate the jQuery FullCalendar plugin into your Symfony2 application.
MIT License
96 stars 60 forks source link

Custom multiple eventSource #67

Open BarraudLilian opened 6 years ago

BarraudLilian commented 6 years ago

In this part we put the URL that calls the controller:

eventSources: [
            {
                url: Routing.generate("fullcalendar_loader"),
                type: 'POST',
                // A way to add custom filters to your event listeners
                data: {
                },
                error: function() {
                   //alert('There was an error while fetching Google Calendar!');
                }
            }
        ],

What i'd need is to have several a loader depending on the user_id. Of course the controller behaves differently according to the user.

As this option in set in the JS that rules the fullCalendar, how would i be able to have, for example url: Routing.generate("route1") if user_1 is logged in and url: Routing.generate("route2") if user_2 is logged in?