Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / paste / application / PhabricatorPasteApplication.php
blob26e4b1740e5ee92ec44dd9273b2144ec79cb615d
1 <?php
3 final class PhabricatorPasteApplication extends PhabricatorApplication {
5 public function getName() {
6 return pht('Paste');
9 public function getBaseURI() {
10 return '/paste/';
13 public function getIcon() {
14 return 'fa-paste';
17 public function getTitleGlyph() {
18 return "\xE2\x9C\x8E";
21 public function getApplicationGroup() {
22 return self::GROUP_UTILITIES;
25 public function getShortDescription() {
26 return pht('Share Text Snippets');
29 public function getRemarkupRules() {
30 return array(
31 new PhabricatorPasteRemarkupRule(),
35 public function getRoutes() {
36 return array(
37 '/P(?P<id>[1-9]\d*)(?:\$(?P<lines>\d+(?:-\d+)?))?'
38 => 'PhabricatorPasteViewController',
39 '/paste/' => array(
40 '(query/(?P<queryKey>[^/]+)/)?' => 'PhabricatorPasteListController',
41 $this->getEditRoutePattern('edit/') => 'PhabricatorPasteEditController',
42 'raw/(?P<id>[1-9]\d*)/' => 'PhabricatorPasteRawController',
43 'archive/(?P<id>[1-9]\d*)/' => 'PhabricatorPasteArchiveController',
48 public function supportsEmailIntegration() {
49 return true;
52 public function getAppEmailBlurb() {
53 return pht(
54 'Send email to these addresses to create pastes. %s',
55 phutil_tag(
56 'a',
57 array(
58 'href' => $this->getInboundEmailSupportLink(),
60 pht('Learn More')));
63 protected function getCustomCapabilities() {
64 return array(
65 PasteDefaultViewCapability::CAPABILITY => array(
66 'caption' => pht('Default view policy for newly created pastes.'),
67 'template' => PhabricatorPastePastePHIDType::TYPECONST,
68 'capability' => PhabricatorPolicyCapability::CAN_VIEW,
70 PasteDefaultEditCapability::CAPABILITY => array(
71 'caption' => pht('Default edit policy for newly created pastes.'),
72 'template' => PhabricatorPastePastePHIDType::TYPECONST,
73 'capability' => PhabricatorPolicyCapability::CAN_EDIT,
78 public function getMailCommandObjects() {
79 return array(
80 'paste' => array(
81 'name' => pht('Email Commands: Pastes'),
82 'header' => pht('Interacting with Pastes'),
83 'object' => new PhabricatorPaste(),
84 'summary' => pht(
85 'This page documents the commands you can use to interact with '.
86 'pastes.'),