Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F73162
D7364.diff
All Users
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
30 KB
Referenced Files
None
Subscribers
None
D7364.diff
View Options
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -90,7 +90,7 @@
'AphrontUsageException' => 'aphront/exception/AphrontUsageException.php',
'AphrontView' => 'view/AphrontView.php',
'AphrontWebpageResponse' => 'aphront/response/AphrontWebpageResponse.php',
- 'AuditPeopleMenuEventListener' => 'applications/audit/events/AuditPeopleMenuEventListener.php',
+ 'AuditActionMenuEventListener' => 'applications/audit/events/AuditActionMenuEventListener.php',
'CelerityAPI' => 'infrastructure/celerity/CelerityAPI.php',
'CelerityPhabricatorResourceController' => 'infrastructure/celerity/CelerityPhabricatorResourceController.php',
'CelerityResourceController' => 'infrastructure/celerity/CelerityResourceController.php',
@@ -244,6 +244,7 @@
'ConduitCallTestCase' => 'applications/conduit/call/__tests__/ConduitCallTestCase.php',
'ConduitException' => 'applications/conduit/protocol/ConduitException.php',
'ConduitSSHWorkflow' => 'applications/conduit/ssh/ConduitSSHWorkflow.php',
+ 'ConpherenceActionMenuEventListener' => 'applications/conpherence/events/ConpherenceActionMenuEventListener.php',
'ConpherenceConfigOptions' => 'applications/conpherence/config/ConpherenceConfigOptions.php',
'ConpherenceConstants' => 'applications/conpherence/constants/ConpherenceConstants.php',
'ConpherenceController' => 'applications/conpherence/controller/ConpherenceController.php',
@@ -261,7 +262,6 @@
'ConpherenceParticipantCountQuery' => 'applications/conpherence/query/ConpherenceParticipantCountQuery.php',
'ConpherenceParticipantQuery' => 'applications/conpherence/query/ConpherenceParticipantQuery.php',
'ConpherenceParticipationStatus' => 'applications/conpherence/constants/ConpherenceParticipationStatus.php',
- 'ConpherencePeopleMenuEventListener' => 'applications/conpherence/events/ConpherencePeopleMenuEventListener.php',
'ConpherencePeopleWidgetView' => 'applications/conpherence/view/ConpherencePeopleWidgetView.php',
'ConpherenceReplyHandler' => 'applications/conpherence/mail/ConpherenceReplyHandler.php',
'ConpherenceSettings' => 'applications/conpherence/constants/ConpherenceSettings.php',
@@ -297,6 +297,7 @@
'DefaultDatabaseConfigurationProvider' => 'infrastructure/storage/configuration/DefaultDatabaseConfigurationProvider.php',
'DifferentialAction' => 'applications/differential/constants/DifferentialAction.php',
'DifferentialActionHasNoEffectException' => 'applications/differential/exception/DifferentialActionHasNoEffectException.php',
+ 'DifferentialActionMenuEventListener' => 'applications/differential/events/DifferentialActionMenuEventListener.php',
'DifferentialAddCommentView' => 'applications/differential/view/DifferentialAddCommentView.php',
'DifferentialAffectedPath' => 'applications/differential/storage/DifferentialAffectedPath.php',
'DifferentialApplyPatchFieldSpecification' => 'applications/differential/field/specification/DifferentialApplyPatchFieldSpecification.php',
@@ -390,7 +391,6 @@
'DifferentialPHIDTypeRevision' => 'applications/differential/phid/DifferentialPHIDTypeRevision.php',
'DifferentialParseRenderTestCase' => 'applications/differential/__tests__/DifferentialParseRenderTestCase.php',
'DifferentialPathFieldSpecification' => 'applications/differential/field/specification/DifferentialPathFieldSpecification.php',
- 'DifferentialPeopleMenuEventListener' => 'applications/differential/events/DifferentialPeopleMenuEventListener.php',
'DifferentialPrimaryPaneView' => 'applications/differential/view/DifferentialPrimaryPaneView.php',
'DifferentialProjectReviewersFieldSpecification' => 'applications/differential/field/specification/DifferentialProjectReviewersFieldSpecification.php',
'DifferentialRawDiffRenderer' => 'applications/differential/render/DifferentialRawDiffRenderer.php',
@@ -704,6 +704,7 @@
'LiskIsolationTestDAOException' => 'infrastructure/storage/lisk/__tests__/LiskIsolationTestDAOException.php',
'LiskMigrationIterator' => 'infrastructure/storage/lisk/LiskMigrationIterator.php',
'LiskRawMigrationIterator' => 'infrastructure/storage/lisk/LiskRawMigrationIterator.php',
+ 'ManiphestActionMenuEventListener' => 'applications/maniphest/event/ManiphestActionMenuEventListener.php',
'ManiphestBatchEditController' => 'applications/maniphest/controller/ManiphestBatchEditController.php',
'ManiphestCapabilityBulkEdit' => 'applications/maniphest/capability/ManiphestCapabilityBulkEdit.php',
'ManiphestCapabilityDefaultEdit' => 'applications/maniphest/capability/ManiphestCapabilityDefaultEdit.php',
@@ -730,7 +731,6 @@
'ManiphestNameIndex' => 'applications/maniphest/storage/ManiphestNameIndex.php',
'ManiphestNameIndexEventListener' => 'applications/maniphest/event/ManiphestNameIndexEventListener.php',
'ManiphestPHIDTypeTask' => 'applications/maniphest/phid/ManiphestPHIDTypeTask.php',
- 'ManiphestPeopleMenuEventListener' => 'applications/maniphest/event/ManiphestPeopleMenuEventListener.php',
'ManiphestRemarkupRule' => 'applications/maniphest/remarkup/ManiphestRemarkupRule.php',
'ManiphestReplyHandler' => 'applications/maniphest/mail/ManiphestReplyHandler.php',
'ManiphestReportController' => 'applications/maniphest/controller/ManiphestReportController.php',
@@ -1157,6 +1157,7 @@
'PhabricatorErrorExample' => 'applications/uiexample/examples/PhabricatorErrorExample.php',
'PhabricatorEvent' => 'infrastructure/events/PhabricatorEvent.php',
'PhabricatorEventEngine' => 'infrastructure/events/PhabricatorEventEngine.php',
+ 'PhabricatorEventListener' => 'infrastructure/events/PhabricatorEventListener.php',
'PhabricatorEventType' => 'infrastructure/events/constant/PhabricatorEventType.php',
'PhabricatorExampleEventListener' => 'infrastructure/events/PhabricatorExampleEventListener.php',
'PhabricatorExtendingPhabricatorConfigOptions' => 'applications/config/option/PhabricatorExtendingPhabricatorConfigOptions.php',
@@ -2225,7 +2226,7 @@
1 => 'PhutilSafeHTMLProducerInterface',
),
'AphrontWebpageResponse' => 'AphrontHTMLResponse',
- 'AuditPeopleMenuEventListener' => 'PhutilEventListener',
+ 'AuditActionMenuEventListener' => 'PhabricatorEventListener',
'CelerityPhabricatorResourceController' => 'CelerityResourceController',
'CelerityResourceController' => 'PhabricatorController',
'CelerityResourceGraph' => 'AbstractDirectedGraph',
@@ -2375,13 +2376,14 @@
'ConduitCallTestCase' => 'PhabricatorTestCase',
'ConduitException' => 'Exception',
'ConduitSSHWorkflow' => 'PhabricatorSSHWorkflow',
+ 'ConpherenceActionMenuEventListener' => 'PhabricatorEventListener',
'ConpherenceConfigOptions' => 'PhabricatorApplicationConfigOptions',
'ConpherenceController' => 'PhabricatorController',
'ConpherenceCreateThreadMailReceiver' => 'PhabricatorMailReceiver',
'ConpherenceDAO' => 'PhabricatorLiskDAO',
'ConpherenceEditor' => 'PhabricatorApplicationTransactionEditor',
'ConpherenceFileWidgetView' => 'ConpherenceWidgetView',
- 'ConpherenceHovercardEventListener' => 'PhutilEventListener',
+ 'ConpherenceHovercardEventListener' => 'PhabricatorEventListener',
'ConpherenceLayoutView' => 'AphrontView',
'ConpherenceListController' => 'ConpherenceController',
'ConpherenceMenuItemView' => 'AphrontTagView',
@@ -2391,7 +2393,6 @@
'ConpherenceParticipantCountQuery' => 'PhabricatorOffsetPagedQuery',
'ConpherenceParticipantQuery' => 'PhabricatorOffsetPagedQuery',
'ConpherenceParticipationStatus' => 'ConpherenceConstants',
- 'ConpherencePeopleMenuEventListener' => 'PhutilEventListener',
'ConpherencePeopleWidgetView' => 'ConpherenceWidgetView',
'ConpherenceReplyHandler' => 'PhabricatorMailReplyHandler',
'ConpherenceSettings' => 'ConpherenceConstants',
@@ -2418,12 +2419,13 @@
'DarkConsoleDataController' => 'PhabricatorController',
'DarkConsoleErrorLogPlugin' => 'DarkConsolePlugin',
'DarkConsoleEventPlugin' => 'DarkConsolePlugin',
- 'DarkConsoleEventPluginAPI' => 'PhutilEventListener',
+ 'DarkConsoleEventPluginAPI' => 'PhabricatorEventListener',
'DarkConsoleRequestPlugin' => 'DarkConsolePlugin',
'DarkConsoleServicesPlugin' => 'DarkConsolePlugin',
'DarkConsoleXHProfPlugin' => 'DarkConsolePlugin',
'DefaultDatabaseConfigurationProvider' => 'DatabaseConfigurationProvider',
'DifferentialActionHasNoEffectException' => 'DifferentialException',
+ 'DifferentialActionMenuEventListener' => 'PhabricatorEventListener',
'DifferentialAddCommentView' => 'AphrontView',
'DifferentialAffectedPath' => 'DifferentialDAO',
'DifferentialApplyPatchFieldSpecification' => 'DifferentialFieldSpecification',
@@ -2496,7 +2498,7 @@
'DifferentialFreeformFieldTestCase' => 'PhabricatorTestCase',
'DifferentialGitSVNIDFieldSpecification' => 'DifferentialFieldSpecification',
'DifferentialHostFieldSpecification' => 'DifferentialFieldSpecification',
- 'DifferentialHovercardEventListener' => 'PhutilEventListener',
+ 'DifferentialHovercardEventListener' => 'PhabricatorEventListener',
'DifferentialHunk' => 'DifferentialDAO',
'DifferentialHunkParserTestCase' => 'PhabricatorTestCase',
'DifferentialHunkTestCase' => 'ArcanistPhutilTestCase',
@@ -2516,7 +2518,6 @@
'DifferentialPHIDTypeRevision' => 'PhabricatorPHIDType',
'DifferentialParseRenderTestCase' => 'PhabricatorTestCase',
'DifferentialPathFieldSpecification' => 'DifferentialFieldSpecification',
- 'DifferentialPeopleMenuEventListener' => 'PhutilEventListener',
'DifferentialPrimaryPaneView' => 'AphrontView',
'DifferentialProjectReviewersFieldSpecification' => 'DifferentialFieldSpecification',
'DifferentialReleephRequestFieldSpecification' => 'DifferentialFieldSpecification',
@@ -2601,7 +2602,7 @@
'DiffusionGitStableCommitNameQuery' => 'DiffusionStableCommitNameQuery',
'DiffusionHistoryController' => 'DiffusionController',
'DiffusionHistoryTableView' => 'DiffusionView',
- 'DiffusionHovercardEventListener' => 'PhutilEventListener',
+ 'DiffusionHovercardEventListener' => 'PhabricatorEventListener',
'DiffusionInlineCommentController' => 'PhabricatorInlineCommentController',
'DiffusionInlineCommentPreviewController' => 'PhabricatorInlineCommentPreviewController',
'DiffusionLastModifiedController' => 'DiffusionController',
@@ -2842,6 +2843,7 @@
'LiskIsolationTestDAOException' => 'Exception',
'LiskMigrationIterator' => 'PhutilBufferedIterator',
'LiskRawMigrationIterator' => 'PhutilBufferedIterator',
+ 'ManiphestActionMenuEventListener' => 'PhabricatorEventListener',
'ManiphestBatchEditController' => 'ManiphestController',
'ManiphestCapabilityBulkEdit' => 'PhabricatorPolicyCapability',
'ManiphestCapabilityDefaultEdit' => 'PhabricatorPolicyCapability',
@@ -2863,14 +2865,13 @@
'ManiphestCustomFieldStorage' => 'PhabricatorCustomFieldStorage',
'ManiphestCustomFieldStringIndex' => 'PhabricatorCustomFieldStringIndexStorage',
'ManiphestDAO' => 'PhabricatorLiskDAO',
- 'ManiphestEdgeEventListener' => 'PhutilEventListener',
+ 'ManiphestEdgeEventListener' => 'PhabricatorEventListener',
'ManiphestExcelDefaultFormat' => 'ManiphestExcelFormat',
'ManiphestExportController' => 'ManiphestController',
- 'ManiphestHovercardEventListener' => 'PhutilEventListener',
+ 'ManiphestHovercardEventListener' => 'PhabricatorEventListener',
'ManiphestNameIndex' => 'ManiphestDAO',
- 'ManiphestNameIndexEventListener' => 'PhutilEventListener',
+ 'ManiphestNameIndexEventListener' => 'PhabricatorEventListener',
'ManiphestPHIDTypeTask' => 'PhabricatorPHIDType',
- 'ManiphestPeopleMenuEventListener' => 'PhutilEventListener',
'ManiphestRemarkupRule' => 'PhabricatorRemarkupRuleObject',
'ManiphestReplyHandler' => 'PhabricatorMailReplyHandler',
'ManiphestReportController' => 'ManiphestController',
@@ -3289,7 +3290,7 @@
'PhabricatorDaemonConsoleController' => 'PhabricatorDaemonController',
'PhabricatorDaemonController' => 'PhabricatorController',
'PhabricatorDaemonDAO' => 'PhabricatorLiskDAO',
- 'PhabricatorDaemonEventListener' => 'PhutilEventListener',
+ 'PhabricatorDaemonEventListener' => 'PhabricatorEventListener',
'PhabricatorDaemonLog' =>
array(
0 => 'PhabricatorDaemonDAO',
@@ -3340,8 +3341,9 @@
'PhabricatorEnvTestCase' => 'PhabricatorTestCase',
'PhabricatorErrorExample' => 'PhabricatorUIExample',
'PhabricatorEvent' => 'PhutilEvent',
+ 'PhabricatorEventListener' => 'PhutilEventListener',
'PhabricatorEventType' => 'PhutilEventType',
- 'PhabricatorExampleEventListener' => 'PhutilEventListener',
+ 'PhabricatorExampleEventListener' => 'PhabricatorEventListener',
'PhabricatorExtendingPhabricatorConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorExternalAccount' =>
array(
@@ -3464,7 +3466,7 @@
'PhabricatorFlagQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
'PhabricatorFlagSearchEngine' => 'PhabricatorApplicationSearchEngine',
'PhabricatorFlagSelectControl' => 'AphrontFormControl',
- 'PhabricatorFlagsUIEventListener' => 'PhutilEventListener',
+ 'PhabricatorFlagsUIEventListener' => 'PhabricatorEventListener',
'PhabricatorFormExample' => 'PhabricatorUIExample',
'PhabricatorGarbageCollectorConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorGarbageCollectorDaemon' => 'PhabricatorDaemon',
@@ -3670,7 +3672,7 @@
'PhabricatorPasteViewController' => 'PhabricatorPasteController',
'PhabricatorPeopleController' => 'PhabricatorController',
'PhabricatorPeopleEditController' => 'PhabricatorPeopleController',
- 'PhabricatorPeopleHovercardEventListener' => 'PhutilEventListener',
+ 'PhabricatorPeopleHovercardEventListener' => 'PhabricatorEventListener',
'PhabricatorPeopleLdapController' => 'PhabricatorPeopleController',
'PhabricatorPeopleListController' =>
array(
@@ -3947,7 +3949,7 @@
'PhabricatorSubscribersQuery' => 'PhabricatorQuery',
'PhabricatorSubscriptionsEditController' => 'PhabricatorController',
'PhabricatorSubscriptionsEditor' => 'PhabricatorEditor',
- 'PhabricatorSubscriptionsUIEventListener' => 'PhutilEventListener',
+ 'PhabricatorSubscriptionsUIEventListener' => 'PhabricatorEventListener',
'PhabricatorSymbolNameLinter' => 'ArcanistXHPASTLintNamingHook',
'PhabricatorSyntaxHighlightingConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorTagExample' => 'PhabricatorUIExample',
@@ -3984,7 +3986,7 @@
'PhabricatorTokenPHIDTypeToken' => 'PhabricatorPHIDType',
'PhabricatorTokenQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
'PhabricatorTokenReceiverQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
- 'PhabricatorTokenUIEventListener' => 'PhutilEventListener',
+ 'PhabricatorTokenUIEventListener' => 'PhabricatorEventListener',
'PhabricatorTransactionView' => 'AphrontView',
'PhabricatorTransformedFile' => 'PhabricatorFileDAO',
'PhabricatorTranslationsConfigOptions' => 'PhabricatorApplicationConfigOptions',
@@ -4237,15 +4239,15 @@
'PhrequentTimeBlock' => 'Phobject',
'PhrequentTimeBlockTestCase' => 'PhabricatorTestCase',
'PhrequentTrackController' => 'PhrequentController',
- 'PhrequentUIEventListener' => 'PhutilEventListener',
+ 'PhrequentUIEventListener' => 'PhabricatorEventListener',
'PhrequentUserTime' =>
array(
0 => 'PhrequentDAO',
1 => 'PhabricatorPolicyInterface',
),
'PhrequentUserTimeQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
'PhrictionActionConstants' => 'PhrictionConstants',
- 'PhrictionActionMenuEventListener' => 'PhutilEventListener',
+ 'PhrictionActionMenuEventListener' => 'PhabricatorEventListener',
'PhrictionChangeType' => 'PhrictionConstants',
'PhrictionContent' =>
array(
diff --git a/src/aphront/console/plugin/event/DarkConsoleEventPluginAPI.php b/src/aphront/console/plugin/event/DarkConsoleEventPluginAPI.php
--- a/src/aphront/console/plugin/event/DarkConsoleEventPluginAPI.php
+++ b/src/aphront/console/plugin/event/DarkConsoleEventPluginAPI.php
@@ -3,7 +3,7 @@
/**
* @group console
*/
-final class DarkConsoleEventPluginAPI extends PhutilEventListener {
+final class DarkConsoleEventPluginAPI extends PhabricatorEventListener {
private static $events = array();
private static $discardMode = false;
diff --git a/src/applications/audit/application/PhabricatorApplicationAudit.php b/src/applications/audit/application/PhabricatorApplicationAudit.php
--- a/src/applications/audit/application/PhabricatorApplicationAudit.php
+++ b/src/applications/audit/application/PhabricatorApplicationAudit.php
@@ -20,7 +20,7 @@
public function getEventListeners() {
return array(
- new AuditPeopleMenuEventListener()
+ new AuditActionMenuEventListener()
);
}
diff --git a/src/applications/audit/events/AuditPeopleMenuEventListener.php b/src/applications/audit/events/AuditActionMenuEventListener.php
rename from src/applications/audit/events/AuditPeopleMenuEventListener.php
rename to src/applications/audit/events/AuditActionMenuEventListener.php
--- a/src/applications/audit/events/AuditPeopleMenuEventListener.php
+++ b/src/applications/audit/events/AuditActionMenuEventListener.php
@@ -1,6 +1,6 @@
<?php
-final class AuditPeopleMenuEventListener extends PhutilEventListener {
+final class AuditActionMenuEventListener extends PhabricatorEventListener {
public function register() {
$this->listen(PhabricatorEventType::TYPE_UI_DIDRENDERACTIONS);
diff --git a/src/applications/conpherence/application/PhabricatorApplicationConpherence.php b/src/applications/conpherence/application/PhabricatorApplicationConpherence.php
--- a/src/applications/conpherence/application/PhabricatorApplicationConpherence.php
+++ b/src/applications/conpherence/application/PhabricatorApplicationConpherence.php
@@ -31,7 +31,7 @@
public function getEventListeners() {
return array(
- new ConpherencePeopleMenuEventListener(),
+ new ConpherenceActionMenuEventListener(),
new ConpherenceHovercardEventListener(),
);
}
diff --git a/src/applications/conpherence/events/ConpherencePeopleMenuEventListener.php b/src/applications/conpherence/events/ConpherenceActionMenuEventListener.php
rename from src/applications/conpherence/events/ConpherencePeopleMenuEventListener.php
rename to src/applications/conpherence/events/ConpherenceActionMenuEventListener.php
--- a/src/applications/conpherence/events/ConpherencePeopleMenuEventListener.php
+++ b/src/applications/conpherence/events/ConpherenceActionMenuEventListener.php
@@ -1,6 +1,7 @@
<?php
-final class ConpherencePeopleMenuEventListener extends PhutilEventListener {
+final class ConpherenceActionMenuEventListener
+ extends PhabricatorEventListener {
public function register() {
$this->listen(PhabricatorEventType::TYPE_UI_DIDRENDERACTIONS);
diff --git a/src/applications/conpherence/events/ConpherenceHovercardEventListener.php b/src/applications/conpherence/events/ConpherenceHovercardEventListener.php
--- a/src/applications/conpherence/events/ConpherenceHovercardEventListener.php
+++ b/src/applications/conpherence/events/ConpherenceHovercardEventListener.php
@@ -8,7 +8,7 @@
*
* @task event
*/
-final class ConpherenceHovercardEventListener extends PhutilEventListener {
+final class ConpherenceHovercardEventListener extends PhabricatorEventListener {
public function register() {
$this->listen(PhabricatorEventType::TYPE_UI_DIDRENDERHOVERCARD);
diff --git a/src/applications/daemon/event/PhabricatorDaemonEventListener.php b/src/applications/daemon/event/PhabricatorDaemonEventListener.php
--- a/src/applications/daemon/event/PhabricatorDaemonEventListener.php
+++ b/src/applications/daemon/event/PhabricatorDaemonEventListener.php
@@ -1,6 +1,6 @@
<?php
-final class PhabricatorDaemonEventListener extends PhutilEventListener {
+final class PhabricatorDaemonEventListener extends PhabricatorEventListener {
private $daemons = array();
diff --git a/src/applications/differential/application/PhabricatorApplicationDifferential.php b/src/applications/differential/application/PhabricatorApplicationDifferential.php
--- a/src/applications/differential/application/PhabricatorApplicationDifferential.php
+++ b/src/applications/differential/application/PhabricatorApplicationDifferential.php
@@ -30,7 +30,7 @@
public function getEventListeners() {
return array(
- new DifferentialPeopleMenuEventListener(),
+ new DifferentialActionMenuEventListener(),
new DifferentialHovercardEventListener(),
);
}
diff --git a/src/applications/differential/events/DifferentialPeopleMenuEventListener.php b/src/applications/differential/events/DifferentialActionMenuEventListener.php
rename from src/applications/differential/events/DifferentialPeopleMenuEventListener.php
rename to src/applications/differential/events/DifferentialActionMenuEventListener.php
--- a/src/applications/differential/events/DifferentialPeopleMenuEventListener.php
+++ b/src/applications/differential/events/DifferentialActionMenuEventListener.php
@@ -1,6 +1,7 @@
<?php
-final class DifferentialPeopleMenuEventListener extends PhutilEventListener {
+final class DifferentialActionMenuEventListener
+ extends PhabricatorEventListener {
public function register() {
$this->listen(PhabricatorEventType::TYPE_UI_DIDRENDERACTIONS);
diff --git a/src/applications/differential/events/DifferentialHovercardEventListener.php b/src/applications/differential/events/DifferentialHovercardEventListener.php
--- a/src/applications/differential/events/DifferentialHovercardEventListener.php
+++ b/src/applications/differential/events/DifferentialHovercardEventListener.php
@@ -1,6 +1,7 @@
<?php
-final class DifferentialHovercardEventListener extends PhutilEventListener {
+final class DifferentialHovercardEventListener
+ extends PhabricatorEventListener {
public function register() {
$this->listen(PhabricatorEventType::TYPE_UI_DIDRENDERHOVERCARD);
diff --git a/src/applications/diffusion/events/DiffusionHovercardEventListener.php b/src/applications/diffusion/events/DiffusionHovercardEventListener.php
--- a/src/applications/diffusion/events/DiffusionHovercardEventListener.php
+++ b/src/applications/diffusion/events/DiffusionHovercardEventListener.php
@@ -1,6 +1,6 @@
<?php
-final class DiffusionHovercardEventListener extends PhutilEventListener {
+final class DiffusionHovercardEventListener extends PhabricatorEventListener {
public function register() {
$this->listen(PhabricatorEventType::TYPE_UI_DIDRENDERHOVERCARD);
diff --git a/src/applications/flag/events/PhabricatorFlagsUIEventListener.php b/src/applications/flag/events/PhabricatorFlagsUIEventListener.php
--- a/src/applications/flag/events/PhabricatorFlagsUIEventListener.php
+++ b/src/applications/flag/events/PhabricatorFlagsUIEventListener.php
@@ -1,6 +1,6 @@
<?php
-final class PhabricatorFlagsUIEventListener extends PhutilEventListener {
+final class PhabricatorFlagsUIEventListener extends PhabricatorEventListener {
public function register() {
$this->listen(PhabricatorEventType::TYPE_UI_DIDRENDERACTIONS);
diff --git a/src/applications/maniphest/application/PhabricatorApplicationManiphest.php b/src/applications/maniphest/application/PhabricatorApplicationManiphest.php
--- a/src/applications/maniphest/application/PhabricatorApplicationManiphest.php
+++ b/src/applications/maniphest/application/PhabricatorApplicationManiphest.php
@@ -35,7 +35,7 @@
public function getEventListeners() {
return array(
new ManiphestNameIndexEventListener(),
- new ManiphestPeopleMenuEventListener(),
+ new ManiphestActionMenuEventListener(),
new ManiphestHovercardEventListener(),
);
}
diff --git a/src/applications/maniphest/event/ManiphestPeopleMenuEventListener.php b/src/applications/maniphest/event/ManiphestActionMenuEventListener.php
rename from src/applications/maniphest/event/ManiphestPeopleMenuEventListener.php
rename to src/applications/maniphest/event/ManiphestActionMenuEventListener.php
--- a/src/applications/maniphest/event/ManiphestPeopleMenuEventListener.php
+++ b/src/applications/maniphest/event/ManiphestActionMenuEventListener.php
@@ -1,6 +1,6 @@
<?php
-final class ManiphestPeopleMenuEventListener extends PhutilEventListener {
+final class ManiphestActionMenuEventListener extends PhabricatorEventListener {
public function register() {
$this->listen(PhabricatorEventType::TYPE_UI_DIDRENDERACTIONS);
diff --git a/src/applications/maniphest/event/ManiphestEdgeEventListener.php b/src/applications/maniphest/event/ManiphestEdgeEventListener.php
--- a/src/applications/maniphest/event/ManiphestEdgeEventListener.php
+++ b/src/applications/maniphest/event/ManiphestEdgeEventListener.php
@@ -7,7 +7,7 @@
*
* @group maniphest
*/
-final class ManiphestEdgeEventListener extends PhutilEventListener {
+final class ManiphestEdgeEventListener extends PhabricatorEventListener {
private $edges = array();
private $tasks = array();
diff --git a/src/applications/maniphest/event/ManiphestHovercardEventListener.php b/src/applications/maniphest/event/ManiphestHovercardEventListener.php
--- a/src/applications/maniphest/event/ManiphestHovercardEventListener.php
+++ b/src/applications/maniphest/event/ManiphestHovercardEventListener.php
@@ -1,6 +1,6 @@
<?php
-final class ManiphestHovercardEventListener extends PhutilEventListener {
+final class ManiphestHovercardEventListener extends PhabricatorEventListener {
public function register() {
$this->listen(PhabricatorEventType::TYPE_UI_DIDRENDERHOVERCARD);
diff --git a/src/applications/maniphest/event/ManiphestNameIndexEventListener.php b/src/applications/maniphest/event/ManiphestNameIndexEventListener.php
--- a/src/applications/maniphest/event/ManiphestNameIndexEventListener.php
+++ b/src/applications/maniphest/event/ManiphestNameIndexEventListener.php
@@ -1,6 +1,6 @@
<?php
-final class ManiphestNameIndexEventListener extends PhutilEventListener {
+final class ManiphestNameIndexEventListener extends PhabricatorEventListener {
public function register() {
$this->listen(PhabricatorEventType::TYPE_SEARCH_DIDUPDATEINDEX);
diff --git a/src/applications/people/event/PhabricatorPeopleHovercardEventListener.php b/src/applications/people/event/PhabricatorPeopleHovercardEventListener.php
--- a/src/applications/people/event/PhabricatorPeopleHovercardEventListener.php
+++ b/src/applications/people/event/PhabricatorPeopleHovercardEventListener.php
@@ -1,7 +1,7 @@
<?php
final class PhabricatorPeopleHovercardEventListener
- extends PhutilEventListener {
+ extends PhabricatorEventListener {
public function register() {
$this->listen(PhabricatorEventType::TYPE_UI_DIDRENDERHOVERCARD);
diff --git a/src/applications/phrequent/event/PhrequentUIEventListener.php b/src/applications/phrequent/event/PhrequentUIEventListener.php
--- a/src/applications/phrequent/event/PhrequentUIEventListener.php
+++ b/src/applications/phrequent/event/PhrequentUIEventListener.php
@@ -1,7 +1,7 @@
<?php
final class PhrequentUIEventListener
- extends PhutilEventListener {
+ extends PhabricatorEventListener {
public function register() {
$this->listen(PhabricatorEventType::TYPE_UI_DIDRENDERACTIONS);
diff --git a/src/applications/phriction/event/PhrictionActionMenuEventListener.php b/src/applications/phriction/event/PhrictionActionMenuEventListener.php
--- a/src/applications/phriction/event/PhrictionActionMenuEventListener.php
+++ b/src/applications/phriction/event/PhrictionActionMenuEventListener.php
@@ -1,6 +1,6 @@
<?php
-final class PhrictionActionMenuEventListener extends PhutilEventListener {
+final class PhrictionActionMenuEventListener extends PhabricatorEventListener {
public function register() {
$this->listen(PhabricatorEventType::TYPE_UI_DIDRENDERACTIONS);
diff --git a/src/applications/subscriptions/events/PhabricatorSubscriptionsUIEventListener.php b/src/applications/subscriptions/events/PhabricatorSubscriptionsUIEventListener.php
--- a/src/applications/subscriptions/events/PhabricatorSubscriptionsUIEventListener.php
+++ b/src/applications/subscriptions/events/PhabricatorSubscriptionsUIEventListener.php
@@ -1,7 +1,7 @@
<?php
final class PhabricatorSubscriptionsUIEventListener
- extends PhutilEventListener {
+ extends PhabricatorEventListener {
public function register() {
$this->listen(PhabricatorEventType::TYPE_UI_DIDRENDERACTIONS);
diff --git a/src/applications/tokens/event/PhabricatorTokenUIEventListener.php b/src/applications/tokens/event/PhabricatorTokenUIEventListener.php
--- a/src/applications/tokens/event/PhabricatorTokenUIEventListener.php
+++ b/src/applications/tokens/event/PhabricatorTokenUIEventListener.php
@@ -1,7 +1,7 @@
<?php
final class PhabricatorTokenUIEventListener
- extends PhutilEventListener {
+ extends PhabricatorEventListener {
public function register() {
$this->listen(PhabricatorEventType::TYPE_UI_DIDRENDERACTIONS);
diff --git a/src/infrastructure/events/PhabricatorEventEngine.php b/src/infrastructure/events/PhabricatorEventEngine.php
--- a/src/infrastructure/events/PhabricatorEventEngine.php
+++ b/src/infrastructure/events/PhabricatorEventEngine.php
@@ -26,6 +26,7 @@
foreach ($applications as $application) {
$listeners = $application->getEventListeners();
foreach ($listeners as $listener) {
+ $listener->setApplication($application);
$listener->register();
}
}
diff --git a/src/infrastructure/events/PhabricatorEventListener.php b/src/infrastructure/events/PhabricatorEventListener.php
new file mode 100644
--- /dev/null
+++ b/src/infrastructure/events/PhabricatorEventListener.php
@@ -0,0 +1,36 @@
+<?php
+
+abstract class PhabricatorEventListener extends PhutilEventListener {
+
+ private $application;
+
+ public function setApplication(PhabricatorApplication $application) {
+ $this->application = $application;
+ return $this;
+ }
+
+ public function getApplication() {
+ return $this->application;
+ }
+
+ public function hasApplicationCapability(
+ PhabricatorUser $viewer,
+ $capability) {
+ return PhabricatorPolicyFilter::hasCapability(
+ $viewer,
+ $this->getApplication(),
+ $capability);
+ }
+
+ public function canUseApplication(PhabricatorUser $viewer) {
+ return $this->hasApplicationCapability(
+ $viewer,
+ PhabricatorPolicyCapability::CAN_VIEW);
+ }
+
+}
+
+
+
+
+
diff --git a/src/infrastructure/events/PhabricatorExampleEventListener.php b/src/infrastructure/events/PhabricatorExampleEventListener.php
--- a/src/infrastructure/events/PhabricatorExampleEventListener.php
+++ b/src/infrastructure/events/PhabricatorExampleEventListener.php
@@ -6,7 +6,7 @@
*
* @group events
*/
-final class PhabricatorExampleEventListener extends PhutilEventListener {
+final class PhabricatorExampleEventListener extends PhabricatorEventListener {
public function register() {
// When your listener is installed, its register() method will be called.
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/u2/4z/7tomxnjliywweozh
Default Alt Text
D7364.diff (30 KB)
Attached To
Mode
D7364: Tie application event listeners to the applications they listen for
Attached
Detach File
Event Timeline
Log In to Comment