Completed
Push — master ( 98677a...347b91 )
by
unknown
01:26
created

Module::getConfigUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace humhub\modules\discordapp;
4
5
use Yii;
6
use yii\helpers\Url;
7
8
class Module extends \humhub\components\Module
9
{
10
11
    public $resourcesPath = 'resources';
12
13
    /**
14
     * @inheritdoc
15
     */
16
    public function getConfigUrl()
17
    {
18
        return Url::to([
19
                    '/discordapp/admin'
20
        ]);
21
    }
22
    public function getServerUrl()
23
    {
24
        $url = $this->settings->get('serverUrl');
25
        if (empty($url)) {
26
            return 'https://discordapp.com';
27
        }
28
        return $url;
29
    }
30
31
}
32