Remove product literal strings in "pht()", part 5
[phabricator.git] / src / applications / files / application / PhabricatorFilesApplication.php
blob2e4c48f0d677259733c9920ed32b00b235cb4804
1 <?php
3 final class PhabricatorFilesApplication extends PhabricatorApplication {
5 public function getBaseURI() {
6 return '/file/';
9 public function getName() {
10 return pht('Files');
13 public function getShortDescription() {
14 return pht('Store and Share Files');
17 public function getIcon() {
18 return 'fa-file';
21 public function getTitleGlyph() {
22 return "\xE2\x87\xAA";
25 public function getFlavorText() {
26 return pht('Blob store for Pokemon pictures.');
29 public function getApplicationGroup() {
30 return self::GROUP_UTILITIES;
33 public function canUninstall() {
34 return false;
37 public function getRemarkupRules() {
38 return array(
39 new PhabricatorEmbedFileRemarkupRule(),
40 new PhabricatorImageRemarkupRule(),
44 public function supportsEmailIntegration() {
45 return true;
48 public function getAppEmailBlurb() {
49 return pht(
50 'Send emails with file attachments to these addresses to upload '.
51 'files. %s',
52 phutil_tag(
53 'a',
54 array(
55 'href' => $this->getInboundEmailSupportLink(),
57 pht('Learn More')));
60 protected function getCustomCapabilities() {
61 return array(
62 FilesDefaultViewCapability::CAPABILITY => array(
63 'caption' => pht('Default view policy for newly created files.'),
64 'template' => PhabricatorFileFilePHIDType::TYPECONST,
65 'capability' => PhabricatorPolicyCapability::CAN_VIEW,
70 public function getRoutes() {
71 return array(
72 '/F(?P<id>[1-9]\d*)(?:\$(?P<lines>\d+(?:-\d+)?))?'
73 => 'PhabricatorFileViewController',
74 '/file/' => array(
75 '(query/(?P<queryKey>[^/]+)/)?' => 'PhabricatorFileListController',
76 'view/(?P<id>[1-9]\d*)/'.
77 '(?:(?P<engineKey>[^/]+)/)?'.
78 '(?:\$(?P<lines>\d+(?:-\d+)?))?'
79 => 'PhabricatorFileViewController',
80 'info/(?P<phid>[^/]+)/' => 'PhabricatorFileViewController',
81 'upload/' => 'PhabricatorFileUploadController',
82 'dropupload/' => 'PhabricatorFileDropUploadController',
83 'compose/' => 'PhabricatorFileComposeController',
84 'thread/(?P<phid>[^/]+)/' => 'PhabricatorFileLightboxController',
85 'delete/(?P<id>[1-9]\d*)/' => 'PhabricatorFileDeleteController',
86 $this->getEditRoutePattern('edit/')
87 => 'PhabricatorFileEditController',
88 'imageproxy/' => 'PhabricatorFileImageProxyController',
89 'transforms/(?P<id>[1-9]\d*)/' =>
90 'PhabricatorFileTransformListController',
91 'uploaddialog/(?P<single>single/)?'
92 => 'PhabricatorFileUploadDialogController',
93 'iconset/(?P<key>[^/]+)/' => array(
94 'select/' => 'PhabricatorFileIconSetSelectController',
96 'document/(?P<engineKey>[^/]+)/(?P<phid>[^/]+)/'
97 => 'PhabricatorFileDocumentController',
98 ) + $this->getResourceSubroutes(),
102 public function getResourceRoutes() {
103 return array(
104 '/file/' => $this->getResourceSubroutes(),
108 private function getResourceSubroutes() {
109 return array(
110 '(?P<kind>data|download)/'.
111 '(?:@(?P<instance>[^/]+)/)?'.
112 '(?P<key>[^/]+)/'.
113 '(?P<phid>[^/]+)/'.
114 '(?:(?P<token>[^/]+)/)?'.
115 '.*'
116 => 'PhabricatorFileDataController',
117 'xform/'.
118 '(?:@(?P<instance>[^/]+)/)?'.
119 '(?P<transform>[^/]+)/'.
120 '(?P<phid>[^/]+)/'.
121 '(?P<key>[^/]+)/'
122 => 'PhabricatorFileTransformController',
126 public function getMailCommandObjects() {
127 return array(
128 'file' => array(
129 'name' => pht('Email Commands: Files'),
130 'header' => pht('Interacting with Files'),
131 'object' => new PhabricatorFile(),
132 'summary' => pht(
133 'This page documents the commands you can use to interact with '.
134 'files.'),
139 public function getQuicksandURIPatternBlacklist() {
140 return array(
141 '/file/(data|download)/.*',