-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathModule.php
55 lines (46 loc) · 1.37 KB
/
Module.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
/**
* Menu Manager
* @link https://github.com/cuzy-app/menu-manager
* @license https://github.com/cuzy-app/menu-manager/blob/master/docs/LICENCE.md
* @author [Marc FARRE](https://marc.fun) for [CUZY.APP](https://www.cuzy.app)
*/
namespace humhub\modules\menuManager;
use humhub\modules\menuManager\models\Configuration;
use Yii;
use yii\helpers\Url;
class Module extends \humhub\components\Module
{
/**
* @var string defines the icon
*/
public $icon = 'circle-o';
/**
* @var string defines path for resources, including the screenshots path for the marketplace
*/
public $resourcesPath = 'resources';
private ?Configuration $_configuration = null;
public function getConfiguration(): Configuration
{
if ($this->_configuration === null) {
$this->_configuration = new Configuration(['settingsManager' => $this->settings]);
$this->_configuration->loadBySettings();
}
return $this->_configuration;
}
/**
* @inheritdoc
*/
public function getConfigUrl()
{
return Url::to(['/menu-manager/config']);
}
public function getName()
{
return Yii::t('MenuManagerModule.base', 'Menu Manager');
}
public function getDescription()
{
return Yii::t('MenuManagerModule.base', 'Change top menu items and add a "Home" item.');
}
}