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
* Create a new class `lib/Service/Importer/Systems/<ImportName>Service.php` where `<ImportName>` is the name of the source system.
3
+
* Create a new importer class extending `ABoardImportService`
4
+
* Create a listener for event `BoardImportGetAllowedEvent` to enable your importer.
5
+
> You can read more about listeners on [Nextcloud](https://docs.nextcloud.com/server/latest/developer_manual/basics/events.html?highlight=event#writing-a-listener) doc.
6
+
7
+
Example:
8
+
9
+
```php
10
+
class YourCustomImporterListener {
11
+
public function handle(Event $event): void {
12
+
if (!($event instanceof BoardImportGetAllowedEvent)) {
13
+
return;
14
+
}
15
+
16
+
$event->getService()->addAllowedImportSystem([
17
+
'name' => YourCustomImporterService::$name,
18
+
'class' => YourCustomImporterService::class,
19
+
'internalName' => 'YourCustomImporter'
20
+
]);
21
+
}
22
+
}
23
+
```
24
+
* Register your listener on your `Application` class like this:
0 commit comments