Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/legalpad/application/PhabricatorLegalpadApplication.php
13473 views
1
<?php
2
3
final class PhabricatorLegalpadApplication extends PhabricatorApplication {
4
5
public function getBaseURI() {
6
return '/legalpad/';
7
}
8
9
public function getName() {
10
return pht('Legalpad');
11
}
12
13
public function getShortDescription() {
14
return pht('Agreements and Signatures');
15
}
16
17
public function getIcon() {
18
return 'fa-gavel';
19
}
20
21
public function getTitleGlyph() {
22
return "\xC2\xA9";
23
}
24
25
public function getApplicationGroup() {
26
return self::GROUP_UTILITIES;
27
}
28
29
public function getRemarkupRules() {
30
return array(
31
new LegalpadDocumentRemarkupRule(),
32
);
33
}
34
35
public function getHelpDocumentationArticles(PhabricatorUser $viewer) {
36
return array(
37
array(
38
'name' => pht('Legalpad User Guide'),
39
'href' => PhabricatorEnv::getDoclink('Legalpad User Guide'),
40
),
41
);
42
}
43
44
public function getOverview() {
45
return pht(
46
'**Legalpad** is a simple application for tracking signatures and '.
47
'legal agreements. At the moment, it is primarily intended to help '.
48
'open source projects keep track of Contributor License Agreements.');
49
}
50
51
public function getRoutes() {
52
return array(
53
'/L(?P<id>\d+)' => 'LegalpadDocumentSignController',
54
'/legalpad/' => array(
55
'' => 'LegalpadDocumentListController',
56
'(?:query/(?P<queryKey>[^/]+)/)?'
57
=> 'LegalpadDocumentListController',
58
$this->getEditRoutePattern('edit/')
59
=> 'LegalpadDocumentEditController',
60
'view/(?P<id>\d+)/' => 'LegalpadDocumentManageController',
61
'done/' => 'LegalpadDocumentDoneController',
62
'verify/(?P<code>[^/]+)/'
63
=> 'LegalpadDocumentSignatureVerificationController',
64
'signatures/(?:(?P<id>\d+)/)?(?:query/(?P<queryKey>[^/]+)/)?'
65
=> 'LegalpadDocumentSignatureListController',
66
'addsignature/(?P<id>\d+)/' => 'LegalpadDocumentSignatureAddController',
67
'signature/(?P<id>\d+)/' => 'LegalpadDocumentSignatureViewController',
68
'document/' => array(
69
'preview/' => 'PhabricatorMarkupPreviewController',
70
),
71
),
72
);
73
}
74
75
protected function getCustomCapabilities() {
76
return array(
77
LegalpadCreateDocumentsCapability::CAPABILITY => array(),
78
LegalpadDefaultViewCapability::CAPABILITY => array(
79
'template' => PhabricatorLegalpadDocumentPHIDType::TYPECONST,
80
'capability' => PhabricatorPolicyCapability::CAN_VIEW,
81
),
82
LegalpadDefaultEditCapability::CAPABILITY => array(
83
'template' => PhabricatorLegalpadDocumentPHIDType::TYPECONST,
84
'capability' => PhabricatorPolicyCapability::CAN_EDIT,
85
),
86
);
87
}
88
89
public function getMailCommandObjects() {
90
return array(
91
'document' => array(
92
'name' => pht('Email Commands: Legalpad Documents'),
93
'header' => pht('Interacting with Legalpad Documents'),
94
'object' => new LegalpadDocument(),
95
'summary' => pht(
96
'This page documents the commands you can use to interact with '.
97
'documents in Legalpad.'),
98
),
99
);
100
}
101
102
}
103
104