3 final class PhabricatorPasteApplication
extends PhabricatorApplication
{
5 public function getName() {
9 public function getBaseURI() {
13 public function getIcon() {
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() {
31 new PhabricatorPasteRemarkupRule(),
35 public function getRoutes() {
37 '/P(?P<id>[1-9]\d*)(?:\$(?P<lines>\d+(?:-\d+)?))?'
38 => 'PhabricatorPasteViewController',
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() {
52 public function getAppEmailBlurb() {
54 'Send email to these addresses to create pastes. %s',
58 'href' => $this->getInboundEmailSupportLink(),
63 protected function getCustomCapabilities() {
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() {
81 'name' => pht('Email Commands: Pastes'),
82 'header' => pht('Interacting with Pastes'),
83 'object' => new PhabricatorPaste(),
85 'This page documents the commands you can use to interact with '.