-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathCreateFileHandler.php
More file actions
39 lines (33 loc) · 884 Bytes
/
CreateFileHandler.php
File metadata and controls
39 lines (33 loc) · 884 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
<?php
/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2017 HumHub GmbH & Co. KG
* @license https://www.humhub.com/licences
*/
namespace humhub\modules\drawio\filehandler;
use humhub\modules\file\handler\BaseFileHandler;
use humhub\modules\ui\icon\widgets\Icon;
use Yii;
use yii\helpers\Url;
/**
* Description of ViewHandler
*
* @author Luke
*/
class CreateFileHandler extends BaseFileHandler
{
public string $icon = 'plus-square';
/**
* @inheritdoc
*/
public function getLinkAttributes()
{
return [
'label' => Icon::get($this->icon) . Yii::t('DrawioModule.base', 'Create draw.io document'),
'data-action-url' => Url::to(['/drawio/create']),
'data-action-click' => 'ui.modal.load',
'data-modal-id' => 'drawio-modal',
'data-modal-close' => '',
];
}
}