-
Notifications
You must be signed in to change notification settings - Fork 46
/
ParticipantsLink.php
36 lines (30 loc) · 911 Bytes
/
ParticipantsLink.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
<?php
/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2022 HumHub GmbH & Co. KG
* @license https://www.humhub.com/licences
*/
namespace humhub\modules\calendar\widgets;
use humhub\modules\calendar\helpers\Url;
use humhub\modules\calendar\models\CalendarEntry;
use humhub\modules\content\widgets\WallEntryControlLink;
use Yii;
class ParticipantsLink extends WallEntryControlLink
{
/**
* @var CalendarEntry
*/
public $entry;
public function init()
{
$this->label = Yii::t('CalendarModule.base', 'Participants');
$this->icon = 'fa-users';
$this->options = [
'data-action-click' => 'editModal',
'data-action-url' => $this->entry->content->canEdit()
? Url::toEditEntryParticipation($this->entry)
: Url::toParticipationUserList($this->entry),
];
parent::init();
}
}