Rename PhabricatorApplication subclasses
Summary: Ref T5655. Some discussion in D9839. Generally speaking, `Phabricator{$name}Application` is clearer than `PhabricatorApplication{$name}`.
Test Plan:
# Pinned and uninstalled some applications.
# Applied patch and performed migrations.
# Verified that the pinned applications were still pinned and that the uninstalled applications were still uninstalled.
# Performed a sanity check on the database contents.
Reviewers: btrahan, epriestley, #blessed_reviewers
Reviewed By: epriestley, #blessed_reviewers
Subscribers: hach-que, epriestley, Korvin
Maniphest Tasks: T5655
Differential Revision: https://secure.phabricator.com/D9982
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
final class PhabricatorPasteApplication extends PhabricatorApplication {
|
||||
|
||||
public function getBaseURI() {
|
||||
return '/paste/';
|
||||
}
|
||||
|
||||
public function getIconName() {
|
||||
return 'paste';
|
||||
}
|
||||
|
||||
public function getTitleGlyph() {
|
||||
return "\xE2\x9C\x8E";
|
||||
}
|
||||
|
||||
public function getApplicationGroup() {
|
||||
return self::GROUP_UTILITIES;
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Share Text Snippets');
|
||||
}
|
||||
|
||||
public function getRemarkupRules() {
|
||||
return array(
|
||||
new PhabricatorPasteRemarkupRule(),
|
||||
);
|
||||
}
|
||||
|
||||
public function getRoutes() {
|
||||
return array(
|
||||
'/P(?P<id>[1-9]\d*)(?:\$(?P<lines>\d+(?:-\d+)?))?'
|
||||
=> 'PhabricatorPasteViewController',
|
||||
'/paste/' => array(
|
||||
'(query/(?P<queryKey>[^/]+)/)?' => 'PhabricatorPasteListController',
|
||||
'create/' => 'PhabricatorPasteEditController',
|
||||
'edit/(?P<id>[1-9]\d*)/' => 'PhabricatorPasteEditController',
|
||||
'comment/(?P<id>[1-9]\d*)/' => 'PhabricatorPasteCommentController',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
protected function getCustomCapabilities() {
|
||||
return array(
|
||||
PasteCapabilityDefaultView::CAPABILITY => array(
|
||||
'caption' => pht('Default view policy for newly created pastes.'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
public function getQuickCreateItems(PhabricatorUser $viewer) {
|
||||
$items = array();
|
||||
|
||||
$item = id(new PHUIListItemView())
|
||||
->setName(pht('Paste'))
|
||||
->setIcon('fa-clipboard')
|
||||
->setHref($this->getBaseURI().'create/');
|
||||
$items[] = $item;
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user