Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13980550
D7364.id16580.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
29 KB
Referenced Files
None
Subscribers
None
D7364.id16580.diff
View Options
Index: src/__phutil_library_map__.php
===================================================================
--- src/__phutil_library_map__.php
+++ 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',
@@ -705,6 +705,7 @@
'LiskMigrationIterator' => 'infrastructure/storage/lisk/LiskMigrationIterator.php',
'LiskRawMigrationIterator' => 'infrastructure/storage/lisk/LiskRawMigrationIterator.php',
'ManiphestAction' => 'applications/maniphest/constants/ManiphestAction.php',
+ 'ManiphestActionMenuEventListener' => 'applications/maniphest/event/ManiphestActionMenuEventListener.php',
'ManiphestBatchEditController' => 'applications/maniphest/controller/ManiphestBatchEditController.php',
'ManiphestCapabilityDefaultEdit' => 'applications/maniphest/capability/ManiphestCapabilityDefaultEdit.php',
'ManiphestCapabilityDefaultView' => 'applications/maniphest/capability/ManiphestCapabilityDefaultView.php',
@@ -725,7 +726,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',
@@ -1153,6 +1153,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',
@@ -2222,7 +2223,7 @@
1 => 'PhutilSafeHTMLProducerInterface',
),
'AphrontWebpageResponse' => 'AphrontHTMLResponse',
- 'AuditPeopleMenuEventListener' => 'PhutilEventListener',
+ 'AuditActionMenuEventListener' => 'PhabricatorEventListener',
'CelerityPhabricatorResourceController' => 'CelerityResourceController',
'CelerityResourceController' => 'PhabricatorController',
'CelerityResourceGraph' => 'AbstractDirectedGraph',
@@ -2372,13 +2373,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',
@@ -2388,7 +2390,6 @@
'ConpherenceParticipantCountQuery' => 'PhabricatorOffsetPagedQuery',
'ConpherenceParticipantQuery' => 'PhabricatorOffsetPagedQuery',
'ConpherenceParticipationStatus' => 'ConpherenceConstants',
- 'ConpherencePeopleMenuEventListener' => 'PhutilEventListener',
'ConpherencePeopleWidgetView' => 'ConpherenceWidgetView',
'ConpherenceReplyHandler' => 'PhabricatorMailReplyHandler',
'ConpherenceSettings' => 'ConpherenceConstants',
@@ -2415,12 +2416,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',
@@ -2493,7 +2495,7 @@
'DifferentialFreeformFieldTestCase' => 'PhabricatorTestCase',
'DifferentialGitSVNIDFieldSpecification' => 'DifferentialFieldSpecification',
'DifferentialHostFieldSpecification' => 'DifferentialFieldSpecification',
- 'DifferentialHovercardEventListener' => 'PhutilEventListener',
+ 'DifferentialHovercardEventListener' => 'PhabricatorEventListener',
'DifferentialHunk' => 'DifferentialDAO',
'DifferentialHunkParserTestCase' => 'PhabricatorTestCase',
'DifferentialHunkTestCase' => 'ArcanistPhutilTestCase',
@@ -2513,7 +2515,6 @@
'DifferentialPHIDTypeRevision' => 'PhabricatorPHIDType',
'DifferentialParseRenderTestCase' => 'PhabricatorTestCase',
'DifferentialPathFieldSpecification' => 'DifferentialFieldSpecification',
- 'DifferentialPeopleMenuEventListener' => 'PhutilEventListener',
'DifferentialPrimaryPaneView' => 'AphrontView',
'DifferentialProjectReviewersFieldSpecification' => 'DifferentialFieldSpecification',
'DifferentialReleephRequestFieldSpecification' => 'DifferentialFieldSpecification',
@@ -2598,7 +2599,7 @@
'DiffusionGitStableCommitNameQuery' => 'DiffusionStableCommitNameQuery',
'DiffusionHistoryController' => 'DiffusionController',
'DiffusionHistoryTableView' => 'DiffusionView',
- 'DiffusionHovercardEventListener' => 'PhutilEventListener',
+ 'DiffusionHovercardEventListener' => 'PhabricatorEventListener',
'DiffusionInlineCommentController' => 'PhabricatorInlineCommentController',
'DiffusionInlineCommentPreviewController' => 'PhabricatorInlineCommentPreviewController',
'DiffusionLastModifiedController' => 'DiffusionController',
@@ -2840,6 +2841,7 @@
'LiskMigrationIterator' => 'PhutilBufferedIterator',
'LiskRawMigrationIterator' => 'PhutilBufferedIterator',
'ManiphestAction' => 'ManiphestConstants',
+ 'ManiphestActionMenuEventListener' => 'PhabricatorEventListener',
'ManiphestBatchEditController' => 'ManiphestController',
'ManiphestCapabilityDefaultEdit' => 'PhabricatorPolicyCapability',
'ManiphestCapabilityDefaultView' => 'PhabricatorPolicyCapability',
@@ -2855,14 +2857,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',
@@ -3282,7 +3283,7 @@
'PhabricatorDaemonConsoleController' => 'PhabricatorDaemonController',
'PhabricatorDaemonController' => 'PhabricatorController',
'PhabricatorDaemonDAO' => 'PhabricatorLiskDAO',
- 'PhabricatorDaemonEventListener' => 'PhutilEventListener',
+ 'PhabricatorDaemonEventListener' => 'PhabricatorEventListener',
'PhabricatorDaemonLog' =>
array(
0 => 'PhabricatorDaemonDAO',
@@ -3333,8 +3334,9 @@
'PhabricatorEnvTestCase' => 'PhabricatorTestCase',
'PhabricatorErrorExample' => 'PhabricatorUIExample',
'PhabricatorEvent' => 'PhutilEvent',
+ 'PhabricatorEventListener' => 'PhutilEventListener',
'PhabricatorEventType' => 'PhutilEventType',
- 'PhabricatorExampleEventListener' => 'PhutilEventListener',
+ 'PhabricatorExampleEventListener' => 'PhabricatorEventListener',
'PhabricatorExtendingPhabricatorConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorExternalAccount' =>
array(
@@ -3458,7 +3460,7 @@
'PhabricatorFlagQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
'PhabricatorFlagSearchEngine' => 'PhabricatorApplicationSearchEngine',
'PhabricatorFlagSelectControl' => 'AphrontFormControl',
- 'PhabricatorFlagsUIEventListener' => 'PhutilEventListener',
+ 'PhabricatorFlagsUIEventListener' => 'PhabricatorEventListener',
'PhabricatorFormExample' => 'PhabricatorUIExample',
'PhabricatorGarbageCollectorConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorGarbageCollectorDaemon' => 'PhabricatorDaemon',
@@ -3664,7 +3666,7 @@
'PhabricatorPasteViewController' => 'PhabricatorPasteController',
'PhabricatorPeopleController' => 'PhabricatorController',
'PhabricatorPeopleEditController' => 'PhabricatorPeopleController',
- 'PhabricatorPeopleHovercardEventListener' => 'PhutilEventListener',
+ 'PhabricatorPeopleHovercardEventListener' => 'PhabricatorEventListener',
'PhabricatorPeopleLdapController' => 'PhabricatorPeopleController',
'PhabricatorPeopleListController' =>
array(
@@ -3941,7 +3943,7 @@
'PhabricatorSubscribersQuery' => 'PhabricatorQuery',
'PhabricatorSubscriptionsEditController' => 'PhabricatorController',
'PhabricatorSubscriptionsEditor' => 'PhabricatorEditor',
- 'PhabricatorSubscriptionsUIEventListener' => 'PhutilEventListener',
+ 'PhabricatorSubscriptionsUIEventListener' => 'PhabricatorEventListener',
'PhabricatorSymbolNameLinter' => 'ArcanistXHPASTLintNamingHook',
'PhabricatorSyntaxHighlightingConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorTagExample' => 'PhabricatorUIExample',
@@ -3978,7 +3980,7 @@
'PhabricatorTokenPHIDTypeToken' => 'PhabricatorPHIDType',
'PhabricatorTokenQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
'PhabricatorTokenReceiverQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
- 'PhabricatorTokenUIEventListener' => 'PhutilEventListener',
+ 'PhabricatorTokenUIEventListener' => 'PhabricatorEventListener',
'PhabricatorTransactionView' => 'AphrontView',
'PhabricatorTransformedFile' => 'PhabricatorFileDAO',
'PhabricatorTranslationsConfigOptions' => 'PhabricatorApplicationConfigOptions',
@@ -4231,7 +4233,7 @@
'PhrequentTimeBlock' => 'Phobject',
'PhrequentTimeBlockTestCase' => 'PhabricatorTestCase',
'PhrequentTrackController' => 'PhrequentController',
- 'PhrequentUIEventListener' => 'PhutilEventListener',
+ 'PhrequentUIEventListener' => 'PhabricatorEventListener',
'PhrequentUserTime' =>
array(
0 => 'PhrequentDAO',
@@ -4239,7 +4241,7 @@
),
'PhrequentUserTimeQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
'PhrictionActionConstants' => 'PhrictionConstants',
- 'PhrictionActionMenuEventListener' => 'PhutilEventListener',
+ 'PhrictionActionMenuEventListener' => 'PhabricatorEventListener',
'PhrictionChangeType' => 'PhrictionConstants',
'PhrictionContent' =>
array(
Index: src/aphront/console/plugin/event/DarkConsoleEventPluginAPI.php
===================================================================
--- src/aphront/console/plugin/event/DarkConsoleEventPluginAPI.php
+++ 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;
Index: src/applications/audit/application/PhabricatorApplicationAudit.php
===================================================================
--- src/applications/audit/application/PhabricatorApplicationAudit.php
+++ src/applications/audit/application/PhabricatorApplicationAudit.php
@@ -20,7 +20,7 @@
public function getEventListeners() {
return array(
- new AuditPeopleMenuEventListener()
+ new AuditActionMenuEventListener()
);
}
Index: src/applications/audit/events/AuditActionMenuEventListener.php
===================================================================
--- src/applications/audit/events/AuditActionMenuEventListener.php
+++ 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);
Index: src/applications/conpherence/application/PhabricatorApplicationConpherence.php
===================================================================
--- src/applications/conpherence/application/PhabricatorApplicationConpherence.php
+++ src/applications/conpherence/application/PhabricatorApplicationConpherence.php
@@ -31,7 +31,7 @@
public function getEventListeners() {
return array(
- new ConpherencePeopleMenuEventListener(),
+ new ConpherenceActionMenuEventListener(),
new ConpherenceHovercardEventListener(),
);
}
Index: src/applications/conpherence/events/ConpherenceActionMenuEventListener.php
===================================================================
--- src/applications/conpherence/events/ConpherenceActionMenuEventListener.php
+++ 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);
Index: src/applications/conpherence/events/ConpherenceHovercardEventListener.php
===================================================================
--- src/applications/conpherence/events/ConpherenceHovercardEventListener.php
+++ 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);
Index: src/applications/daemon/event/PhabricatorDaemonEventListener.php
===================================================================
--- src/applications/daemon/event/PhabricatorDaemonEventListener.php
+++ src/applications/daemon/event/PhabricatorDaemonEventListener.php
@@ -1,6 +1,6 @@
<?php
-final class PhabricatorDaemonEventListener extends PhutilEventListener {
+final class PhabricatorDaemonEventListener extends PhabricatorEventListener {
private $daemons = array();
Index: src/applications/differential/application/PhabricatorApplicationDifferential.php
===================================================================
--- src/applications/differential/application/PhabricatorApplicationDifferential.php
+++ src/applications/differential/application/PhabricatorApplicationDifferential.php
@@ -30,7 +30,7 @@
public function getEventListeners() {
return array(
- new DifferentialPeopleMenuEventListener(),
+ new DifferentialActionMenuEventListener(),
new DifferentialHovercardEventListener(),
);
}
Index: src/applications/differential/events/DifferentialActionMenuEventListener.php
===================================================================
--- src/applications/differential/events/DifferentialActionMenuEventListener.php
+++ 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);
Index: src/applications/differential/events/DifferentialHovercardEventListener.php
===================================================================
--- src/applications/differential/events/DifferentialHovercardEventListener.php
+++ 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);
Index: src/applications/diffusion/events/DiffusionHovercardEventListener.php
===================================================================
--- src/applications/diffusion/events/DiffusionHovercardEventListener.php
+++ 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);
Index: src/applications/flag/events/PhabricatorFlagsUIEventListener.php
===================================================================
--- src/applications/flag/events/PhabricatorFlagsUIEventListener.php
+++ 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);
Index: src/applications/maniphest/application/PhabricatorApplicationManiphest.php
===================================================================
--- src/applications/maniphest/application/PhabricatorApplicationManiphest.php
+++ src/applications/maniphest/application/PhabricatorApplicationManiphest.php
@@ -35,7 +35,7 @@
public function getEventListeners() {
return array(
new ManiphestNameIndexEventListener(),
- new ManiphestPeopleMenuEventListener(),
+ new ManiphestActionMenuEventListener(),
new ManiphestHovercardEventListener(),
);
}
Index: src/applications/maniphest/event/ManiphestActionMenuEventListener.php
===================================================================
--- src/applications/maniphest/event/ManiphestActionMenuEventListener.php
+++ 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);
Index: src/applications/maniphest/event/ManiphestEdgeEventListener.php
===================================================================
--- src/applications/maniphest/event/ManiphestEdgeEventListener.php
+++ 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();
Index: src/applications/maniphest/event/ManiphestHovercardEventListener.php
===================================================================
--- src/applications/maniphest/event/ManiphestHovercardEventListener.php
+++ 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);
Index: src/applications/maniphest/event/ManiphestNameIndexEventListener.php
===================================================================
--- src/applications/maniphest/event/ManiphestNameIndexEventListener.php
+++ 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);
Index: src/applications/people/event/PhabricatorPeopleHovercardEventListener.php
===================================================================
--- src/applications/people/event/PhabricatorPeopleHovercardEventListener.php
+++ 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);
Index: src/applications/phrequent/event/PhrequentUIEventListener.php
===================================================================
--- src/applications/phrequent/event/PhrequentUIEventListener.php
+++ 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);
Index: src/applications/phriction/event/PhrictionActionMenuEventListener.php
===================================================================
--- src/applications/phriction/event/PhrictionActionMenuEventListener.php
+++ 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);
Index: src/applications/subscriptions/events/PhabricatorSubscriptionsUIEventListener.php
===================================================================
--- src/applications/subscriptions/events/PhabricatorSubscriptionsUIEventListener.php
+++ 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);
Index: src/applications/tokens/event/PhabricatorTokenUIEventListener.php
===================================================================
--- src/applications/tokens/event/PhabricatorTokenUIEventListener.php
+++ 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);
Index: src/infrastructure/events/PhabricatorEventEngine.php
===================================================================
--- src/infrastructure/events/PhabricatorEventEngine.php
+++ 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();
}
}
Index: src/infrastructure/events/PhabricatorEventListener.php
===================================================================
--- /dev/null
+++ 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);
+ }
+
+}
+
+
+
+
+
Index: src/infrastructure/events/PhabricatorExampleEventListener.php
===================================================================
--- src/infrastructure/events/PhabricatorExampleEventListener.php
+++ 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/plain
Expires
Sun, Oct 20, 11:23 AM (3 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6736253
Default Alt Text
D7364.id16580.diff (29 KB)
Attached To
Mode
D7364: Tie application event listeners to the applications they listen for
Attached
Detach File
Event Timeline
Log In to Comment