This repository has been archived by the owner on Jun 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Plugin.php
executable file
·66 lines (56 loc) · 1.84 KB
/
Plugin.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
56
57
58
59
60
61
62
63
64
65
66
<?php
namespace Kanboard\Plugin\KanboardProjectInvitation;
use Kanboard\Core\Plugin\Base;
use Kanboard\Core\Translator;
class Plugin extends Base
{
public function initialize()
{
if (APP_VERSION < 'v1.2.11') {
$this->template->setTemplateOverride('project_permission/users', 'KanboardProjectInvitation:users-override');
} else {
$this->template->hook->attachCallable('template:project-permission:after-adduser',
'KanboardProjectInvitation:users',
function ($project, $values, $errors) {
$project_id = $this->request->getIntegerParam('project_id', $project['project_id']);
return array(
'project_id' => $project_id,
'values' => $values,
'errors' => $errors
);
});
}
}
public function getClasses()
{
return array(
'Plugin\KanboardProjectInvitation\Controller' => array(
'ProjectInviteController',
)
);
}
public function onStartup()
{
Translator::load($this->languageModel->getCurrentLanguage(), __DIR__ . '/Locale');
}
public function getPluginName()
{
return 'KanboardProjectInvitation';
}
public function getPluginDescription()
{
return t("Plugin is used to invite new users to actual Project by typing user's email. Input for invitation is located in `Project Settings->Permissions`.");
}
public function getPluginAuthor()
{
return 'Andrei Volgin / Hussein Khalil, ipunkt Business Solutions';
}
public function getPluginVersion()
{
return '1.0.0';
}
public function getPluginHomepage()
{
return 'https://www.ipunkt.biz/unternehmen/opensource';
}
}