3 final class PhabricatorLegalpadApplication
extends PhabricatorApplication
{
5 public function getBaseURI() {
9 public function getName() {
10 return pht('Legalpad');
13 public function getShortDescription() {
14 return pht('Agreements and Signatures');
17 public function getIcon() {
21 public function getTitleGlyph() {
25 public function getApplicationGroup() {
26 return self
::GROUP_UTILITIES
;
29 public function getRemarkupRules() {
31 new LegalpadDocumentRemarkupRule(),
35 public function getHelpDocumentationArticles(PhabricatorUser
$viewer) {
38 'name' => pht('Legalpad User Guide'),
39 'href' => PhabricatorEnv
::getDoclink('Legalpad User Guide'),
44 public function getOverview() {
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.');
51 public function getRoutes() {
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',
69 'preview/' => 'PhabricatorMarkupPreviewController',
75 protected function getCustomCapabilities() {
77 LegalpadCreateDocumentsCapability
::CAPABILITY
=> array(),
78 LegalpadDefaultViewCapability
::CAPABILITY
=> array(
79 'template' => PhabricatorLegalpadDocumentPHIDType
::TYPECONST
,
80 'capability' => PhabricatorPolicyCapability
::CAN_VIEW
,
82 LegalpadDefaultEditCapability
::CAPABILITY
=> array(
83 'template' => PhabricatorLegalpadDocumentPHIDType
::TYPECONST
,
84 'capability' => PhabricatorPolicyCapability
::CAN_EDIT
,
89 public function getMailCommandObjects() {
92 'name' => pht('Email Commands: Legalpad Documents'),
93 'header' => pht('Interacting with Legalpad Documents'),
94 'object' => new LegalpadDocument(),
96 'This page documents the commands you can use to interact with '.
97 'documents in Legalpad.'),