2018-05-22 09:03:29 +02:00
|
|
|
// (C) Copyright 2015 Martin Dougiamas
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
|
|
|
import { NgModule } from '@angular/core';
|
2018-05-23 08:41:20 +02:00
|
|
|
import { CoreCronDelegate } from '@providers/cron';
|
|
|
|
import { CoreCourseModuleDelegate } from '@core/course/providers/module-delegate';
|
2018-05-22 13:07:15 +02:00
|
|
|
import { CoreCourseModulePrefetchDelegate } from '@core/course/providers/module-prefetch-delegate';
|
2018-05-28 11:42:32 +02:00
|
|
|
import { CoreContentLinksDelegate } from '@core/contentlinks/providers/delegate';
|
2018-05-24 12:33:53 +02:00
|
|
|
import { AddonModWikiComponentsModule } from './components/components.module';
|
2018-05-22 09:03:29 +02:00
|
|
|
import { AddonModWikiProvider } from './providers/wiki';
|
|
|
|
import { AddonModWikiOfflineProvider } from './providers/wiki-offline';
|
2018-05-22 13:07:15 +02:00
|
|
|
import { AddonModWikiSyncProvider } from './providers/wiki-sync';
|
2018-05-23 08:41:20 +02:00
|
|
|
import { AddonModWikiModuleHandler } from './providers/module-handler';
|
2018-05-22 13:07:15 +02:00
|
|
|
import { AddonModWikiPrefetchHandler } from './providers/prefetch-handler';
|
2018-05-23 08:41:20 +02:00
|
|
|
import { AddonModWikiSyncCronHandler } from './providers/sync-cron-handler';
|
2018-05-28 11:42:32 +02:00
|
|
|
import { AddonModWikiIndexLinkHandler } from './providers/index-link-handler';
|
|
|
|
import { AddonModWikiPageOrMapLinkHandler } from './providers/page-or-map-link-handler';
|
|
|
|
import { AddonModWikiCreateLinkHandler } from './providers/create-link-handler';
|
|
|
|
import { AddonModWikiEditLinkHandler } from './providers/edit-link-handler';
|
2018-05-22 09:03:29 +02:00
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
declarations: [
|
|
|
|
],
|
|
|
|
imports: [
|
2018-05-24 12:33:53 +02:00
|
|
|
AddonModWikiComponentsModule
|
2018-05-22 09:03:29 +02:00
|
|
|
],
|
|
|
|
providers: [
|
|
|
|
AddonModWikiProvider,
|
2018-05-22 13:07:15 +02:00
|
|
|
AddonModWikiOfflineProvider,
|
|
|
|
AddonModWikiSyncProvider,
|
2018-05-23 08:41:20 +02:00
|
|
|
AddonModWikiModuleHandler,
|
|
|
|
AddonModWikiPrefetchHandler,
|
2018-05-28 11:42:32 +02:00
|
|
|
AddonModWikiSyncCronHandler,
|
|
|
|
AddonModWikiIndexLinkHandler,
|
|
|
|
AddonModWikiPageOrMapLinkHandler,
|
|
|
|
AddonModWikiCreateLinkHandler,
|
|
|
|
AddonModWikiEditLinkHandler
|
2018-05-22 09:03:29 +02:00
|
|
|
]
|
|
|
|
})
|
2018-05-22 13:07:15 +02:00
|
|
|
export class AddonModWikiModule {
|
2018-05-23 08:41:20 +02:00
|
|
|
constructor(moduleDelegate: CoreCourseModuleDelegate, moduleHandler: AddonModWikiModuleHandler,
|
|
|
|
prefetchDelegate: CoreCourseModulePrefetchDelegate, prefetchHandler: AddonModWikiPrefetchHandler,
|
2018-05-28 11:42:32 +02:00
|
|
|
cronDelegate: CoreCronDelegate, syncHandler: AddonModWikiSyncCronHandler, linksDelegate: CoreContentLinksDelegate,
|
|
|
|
indexHandler: AddonModWikiIndexLinkHandler, pageOrMapHandler: AddonModWikiPageOrMapLinkHandler,
|
|
|
|
createHandler: AddonModWikiCreateLinkHandler, editHandler: AddonModWikiEditLinkHandler) {
|
2018-05-22 13:07:15 +02:00
|
|
|
|
2018-05-23 08:41:20 +02:00
|
|
|
moduleDelegate.registerHandler(moduleHandler);
|
2018-05-22 13:07:15 +02:00
|
|
|
prefetchDelegate.registerHandler(prefetchHandler);
|
2018-05-23 08:41:20 +02:00
|
|
|
cronDelegate.register(syncHandler);
|
2018-05-28 11:42:32 +02:00
|
|
|
linksDelegate.registerHandler(indexHandler);
|
|
|
|
linksDelegate.registerHandler(pageOrMapHandler);
|
|
|
|
linksDelegate.registerHandler(createHandler);
|
|
|
|
linksDelegate.registerHandler(editHandler);
|
2018-05-22 13:07:15 +02:00
|
|
|
}
|
|
|
|
}
|