mirror of
https://we.phorge.it/source/phorge.git
synced 2025-03-08 18:34:47 +01:00
Implement the getName
method in PhabricatorApplication
subclasses
Summary: Provide an implementation for the `getName` method rather than automagically determining the application name. Test Plan: Saw reasonable application names in the launcher. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D10027
This commit is contained in:
parent
e0a7d47e0d
commit
0c8f487b0f
41 changed files with 169 additions and 11 deletions
|
@ -10,6 +10,10 @@ final class PhabricatorAuditApplication extends PhabricatorApplication {
|
|||
return 'audit';
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('Audit');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Browse and Audit Commits');
|
||||
}
|
||||
|
|
|
@ -18,6 +18,10 @@ final class PhabricatorAuthApplication extends PhabricatorApplication {
|
|||
return $viewer->getIsAdmin();
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('Auth');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Login/Registration');
|
||||
}
|
||||
|
|
|
@ -27,23 +27,21 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
|
|||
/* -( Application Information )-------------------------------------------- */
|
||||
|
||||
|
||||
/**
|
||||
* TODO: This should be abstract, but is not for historical reasons.
|
||||
*/
|
||||
public function getName() {
|
||||
|
||||
// TODO: This is sort of gross.
|
||||
phutil_deprecated(
|
||||
'Automatic naming of `PhabricatorApplication` classes.',
|
||||
'You should override the `getName` method.');
|
||||
|
||||
$match = null;
|
||||
|
||||
$regex = '/^Phabricator([A-Z][a-zA-Z]*)Application$/';
|
||||
if (preg_match($regex, get_class($this), $match)) {
|
||||
return $match[1];
|
||||
}
|
||||
|
||||
$regex = '/^PhabricatorApplication([A-Z][a-zA-Z]*)$/';
|
||||
if (preg_match($regex, get_class($this), $match)) {
|
||||
return $match[1];
|
||||
}
|
||||
|
||||
throw new Exception('Unable to determine application name automagically.');
|
||||
throw new PhutilMethodNotImplementedException();
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
|
|
|
@ -4,6 +4,10 @@ final class PhabricatorTestApplication extends PhabricatorApplication {
|
|||
|
||||
private $policies = array();
|
||||
|
||||
public function getName() {
|
||||
return pht('Test');
|
||||
}
|
||||
|
||||
public function isUnlisted() {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
final class PhabricatorCalendarApplication extends PhabricatorApplication {
|
||||
|
||||
public function getName() {
|
||||
return pht('Calendar');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Upcoming Events');
|
||||
}
|
||||
|
|
|
@ -6,6 +6,10 @@ final class PhabricatorChatLogApplication extends PhabricatorApplication {
|
|||
return '/chatlog/';
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('ChatLog');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('IRC Logs');
|
||||
}
|
||||
|
|
|
@ -18,6 +18,10 @@ final class PhabricatorConduitApplication extends PhabricatorApplication {
|
|||
return PhabricatorEnv::getDoclink('Conduit Technical Documentation');
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('Conduit');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Developer API');
|
||||
}
|
||||
|
|
|
@ -26,6 +26,10 @@ final class PhabricatorConfigApplication extends PhabricatorApplication {
|
|||
return false;
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return 'Config';
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Configure Phabricator');
|
||||
}
|
||||
|
|
|
@ -6,6 +6,10 @@ final class PhabricatorConpherenceApplication extends PhabricatorApplication {
|
|||
return '/conpherence/';
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('Conpherence');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Send Messages');
|
||||
}
|
||||
|
|
|
@ -10,6 +10,10 @@ final class PhabricatorCountdownApplication extends PhabricatorApplication {
|
|||
return 'countdown';
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('Countdown');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Countdown to Events');
|
||||
}
|
||||
|
|
|
@ -6,6 +6,10 @@ final class PhabricatorDifferentialApplication extends PhabricatorApplication {
|
|||
return '/differential/';
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('Differential');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Review Code');
|
||||
}
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
final class PhabricatorDiffusionApplication extends PhabricatorApplication {
|
||||
|
||||
public function getName() {
|
||||
return pht('Diffusion');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Host and Browse Repositories');
|
||||
}
|
||||
|
|
|
@ -10,6 +10,10 @@ final class PhabricatorDivinerApplication extends PhabricatorApplication {
|
|||
return 'diviner';
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('Diviner');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Documentation');
|
||||
}
|
||||
|
|
|
@ -10,6 +10,10 @@ final class PhabricatorDoorkeeperApplication extends PhabricatorApplication {
|
|||
return false;
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('Doorkeeper');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Connect to Other Software');
|
||||
}
|
||||
|
|
|
@ -6,6 +6,10 @@ final class PhabricatorDrydockApplication extends PhabricatorApplication {
|
|||
return '/drydock/';
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('Drydock');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Allocate Software Resources');
|
||||
}
|
||||
|
|
|
@ -6,6 +6,10 @@ final class PhabricatorFeedApplication extends PhabricatorApplication {
|
|||
return '/feed/';
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('Feed');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Review Recent Activity');
|
||||
}
|
||||
|
|
|
@ -6,6 +6,10 @@ final class PhabricatorFilesApplication extends PhabricatorApplication {
|
|||
return '/file/';
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('Files');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return 'Store and Share Files';
|
||||
}
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
final class PhabricatorFlagsApplication extends PhabricatorApplication {
|
||||
|
||||
public function getName() {
|
||||
return pht('Flags');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Personal Bookmarks');
|
||||
}
|
||||
|
|
|
@ -6,6 +6,10 @@ final class PhabricatorHarbormasterApplication extends PhabricatorApplication {
|
|||
return '/harbormaster/';
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('Harbormaster');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Build/CI');
|
||||
}
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
final class PhabricatorHelpApplication extends PhabricatorApplication {
|
||||
|
||||
public function getName() {
|
||||
return pht('Help');
|
||||
}
|
||||
|
||||
public function canUninstall() {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -10,6 +10,10 @@ final class PhabricatorHeraldApplication extends PhabricatorApplication {
|
|||
return 'herald';
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('Herald');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Create Notification Rules');
|
||||
}
|
||||
|
|
|
@ -8,6 +8,10 @@ final class PhabricatorHomeApplication extends PhabricatorApplication {
|
|||
return '/home/';
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('Home');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Command Center');
|
||||
}
|
||||
|
|
|
@ -6,6 +6,10 @@ final class PhabricatorLegalpadApplication extends PhabricatorApplication {
|
|||
return '/legalpad/';
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('Legalpad');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Agreements and Signatures');
|
||||
}
|
||||
|
|
|
@ -6,6 +6,10 @@ final class PhabricatorMacroApplication extends PhabricatorApplication {
|
|||
return '/macro/';
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('Macro');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Image Macros and Memes');
|
||||
}
|
||||
|
|
|
@ -2,8 +2,12 @@
|
|||
|
||||
final class PhabricatorManiphestApplication extends PhabricatorApplication {
|
||||
|
||||
public function getName() {
|
||||
return pht('Maniphest');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return 'Tasks and Bugs';
|
||||
return pht('Tasks and Bugs');
|
||||
}
|
||||
|
||||
public function getBaseURI() {
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
final class PhabricatorApplicationsApplication extends PhabricatorApplication {
|
||||
|
||||
public function getName() {
|
||||
return pht('Applications');
|
||||
}
|
||||
|
||||
public function canUninstall() {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
final class PhabricatorPeopleApplication extends PhabricatorApplication {
|
||||
|
||||
public function getName() {
|
||||
return pht('People');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('User Accounts and Profiles');
|
||||
}
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
final class PhabricatorPhrequentApplication extends PhabricatorApplication {
|
||||
|
||||
public function getName() {
|
||||
return pht('Phrequent');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Track Time Spent');
|
||||
}
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
final class PhabricatorPhrictionApplication extends PhabricatorApplication {
|
||||
|
||||
public function getName() {
|
||||
return pht('Phriction');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Wiki');
|
||||
}
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
final class PhabricatorPolicyApplication extends PhabricatorApplication {
|
||||
|
||||
public function getName() {
|
||||
return pht('Policy');
|
||||
}
|
||||
|
||||
public function isLaunchable() {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,10 @@ final class PhabricatorPonderApplication extends PhabricatorApplication {
|
|||
return '/ponder/';
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('Ponder');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Questions and Answers');
|
||||
}
|
||||
|
|
|
@ -10,6 +10,10 @@ final class PhabricatorRepositoriesApplication extends PhabricatorApplication {
|
|||
return 'repositories';
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('Repositories');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('(Deprecated)');
|
||||
}
|
||||
|
|
|
@ -6,6 +6,10 @@ final class PhabricatorSettingsApplication extends PhabricatorApplication {
|
|||
return '/settings/';
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('Settings');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('User Preferences');
|
||||
}
|
||||
|
|
|
@ -10,8 +10,12 @@ final class PhabricatorSlowvoteApplication extends PhabricatorApplication {
|
|||
return 'slowvote';
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('Slowvote');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return 'Conduct Polls';
|
||||
return pht('Conduct Polls');
|
||||
}
|
||||
|
||||
public function getTitleGlyph() {
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
final class PhabricatorSubscriptionsApplication extends PhabricatorApplication {
|
||||
|
||||
public function getName() {
|
||||
return pht('Subscriptions');
|
||||
}
|
||||
|
||||
public function isLaunchable() {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
final class PhabricatorSupportApplication extends PhabricatorApplication {
|
||||
|
||||
public function getName() {
|
||||
return pht('Support');
|
||||
}
|
||||
|
||||
public function canUninstall() {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
final class PhabricatorSystemApplication extends PhabricatorApplication {
|
||||
|
||||
public function getName() {
|
||||
return pht('System');
|
||||
}
|
||||
|
||||
public function canUninstall() {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
final class PhabricatorTransactionsApplication extends PhabricatorApplication {
|
||||
|
||||
public function getName() {
|
||||
return pht('Transactions');
|
||||
}
|
||||
|
||||
public function isLaunchable() {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
final class PhabricatorTypeaheadApplication extends PhabricatorApplication {
|
||||
|
||||
public function getName() {
|
||||
return pht('Typeahead');
|
||||
}
|
||||
|
||||
public function getRoutes() {
|
||||
return array(
|
||||
'/typeahead/' => array(
|
||||
|
|
|
@ -10,6 +10,10 @@ final class PhabricatorUIExamplesApplication extends PhabricatorApplication {
|
|||
return pht('Developer UI Examples');
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('UIExamples');
|
||||
}
|
||||
|
||||
public function getIconName() {
|
||||
return 'uiexamples';
|
||||
}
|
||||
|
|
|
@ -6,6 +6,10 @@ final class PhabricatorXHProfApplication extends PhabricatorApplication {
|
|||
return '/xhprof/';
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('XHProf');
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('PHP Profiling Tool');
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue