mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-01 03:02:43 +01:00
d66972c9f2
Summary: Ref T3675. Some of these listeners shouldn't do their thing if the viewer doesn't have access to an application (for example, users without access to Differential should not be able to "Edit Tasks"). Set the stage for that: - Introduce `PhabricatorEventListener`, which has an application. - Populate this for event listeners installed by applications. - Rename the "PeopleMenu" listeners to "ActionMenu" listeners, which better describes their modern behavior. This doesn't actually change any behaviors. Test Plan: Viewed Maniphest, Differntial, People. Reviewers: btrahan, chad Reviewed By: btrahan CC: aran Maniphest Tasks: T3675 Differential Revision: https://secure.phabricator.com/D7364
53 lines
1.3 KiB
PHP
53 lines
1.3 KiB
PHP
<?php
|
|
|
|
/**
|
|
* @group conpherence
|
|
*/
|
|
final class PhabricatorApplicationConpherence extends PhabricatorApplication {
|
|
|
|
public function getBaseURI() {
|
|
return '/conpherence/';
|
|
}
|
|
|
|
public function getQuickCreateURI() {
|
|
return $this->getBaseURI().'new/';
|
|
}
|
|
|
|
public function getShortDescription() {
|
|
return pht('Messaging');
|
|
}
|
|
|
|
public function getIconName() {
|
|
return 'conpherence';
|
|
}
|
|
|
|
public function getTitleGlyph() {
|
|
return "\xE2\x98\x8E";
|
|
}
|
|
|
|
public function getApplicationGroup() {
|
|
return self::GROUP_COMMUNICATION;
|
|
}
|
|
|
|
public function getEventListeners() {
|
|
return array(
|
|
new ConpherenceActionMenuEventListener(),
|
|
new ConpherenceHovercardEventListener(),
|
|
);
|
|
}
|
|
|
|
public function getRoutes() {
|
|
return array(
|
|
'/conpherence/' => array(
|
|
'' => 'ConpherenceListController',
|
|
'thread/(?P<id>[1-9]\d*)/' => 'ConpherenceListController',
|
|
'(?P<id>[1-9]\d*)/' => 'ConpherenceViewController',
|
|
'new/' => 'ConpherenceNewController',
|
|
'panel/' => 'ConpherenceNotificationPanelController',
|
|
'widget/(?P<id>[1-9]\d*)/' => 'ConpherenceWidgetController',
|
|
'update/(?P<id>[1-9]\d*)/' => 'ConpherenceUpdateController',
|
|
),
|
|
);
|
|
}
|
|
|
|
}
|