forked from humhub-contrib/onlydocuments
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathconfig.php
32 lines (27 loc) · 846 Bytes
/
config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/**
* Copyright (c) Ascensio System SIA 2024. All rights reserved.
* http://www.onlyoffice.com
*/
use humhub\modules\file\handler\FileHandlerCollection;
use humhub\modules\file\models\File;
use humhub\modules\onlyoffice\Events;
$config = [
'id' => 'onlyoffice',
'class' => 'humhub\modules\onlyoffice\Module',
'namespace' => 'humhub\modules\onlyoffice',
'events' => [
[
FileHandlerCollection::className(),
FileHandlerCollection::EVENT_INIT,
['humhub\modules\onlyoffice\Events', 'onFileHandlerCollection']
],
]
];
if (defined('humhub\modules\file\models\File::EVENT_AFTER_NEW_STORED_FILE')) {
array_push(
$config['events'],
[File::class, File::EVENT_AFTER_NEW_STORED_FILE, [Events::class, 'onAfterNewStoredFile']]
);
};
return $config;