public addEventSources()

in legacy/src/Calendar/Calendar.ts [129:158]


    public addEventSources(sources: SourceAndOptions[]): CalendarEventSource[] {
        if (this._disposed) {
            return [];
        }
        sources.forEach(source => {
            const calendarSource = this._createEventSource(source.source, source.options || {});
            this._calendarSources.push(calendarSource);
            this._element.fullCalendar("addEventSource", calendarSource);

            if (source.callbacks) {
                const callbackTypes = Object.keys(source.callbacks);
                for (let i = 0; i < callbackTypes.length; ++i) {
                    const callbackType: FullCalendarCallbackType = parseInt(callbackTypes[i]);
                    if (callbackType === FullCalendarCallbackType.eventAfterAllRender) {
                        // This callback doesn't make sense for individual events.
                        continue;
                    }
                    this.addCallback(
                        callbackType,
                        this._createFilteredCallback(
                            source.callbacks[callbackTypes[i]],
                            event => event["eventType"] === source.source.id,
                        ),
                    );
                }
            }
        });

        return this._calendarSources;
    }