-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathModule.php
More file actions
41 lines (33 loc) · 737 Bytes
/
Copy pathModule.php
File metadata and controls
41 lines (33 loc) · 737 Bytes
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
33
34
35
36
37
38
39
40
41
<?php
namespace Baleks\humhub\modules\mostactivespaces;
use Yii;
use yii\helpers\Url;
class Module extends \humhub\components\Module
{
/**
* @inheritdoc
*/
public function getConfigUrl()
{
return Url::to(['/mostactivespaces/admin']);
}
/**
* @inheritdoc
*/
public function enable()
{
parent::enable();
$module = Yii::$app->getModule('mostactivespaces');
if (! $module->settings->get('spaces_count')) {
$module->settings->set('spaces_count', 5);
}
}
/**
* @inheritdoc
*/
public function disable()
{
// Cleanup all module data, don't remove the parent::disable()!!!
parent::disable();
}
}