summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2021-10-25 22:20:19 +0000
committerChristopher Ng <chrng8@gmail.com>2021-10-25 22:20:19 +0000
commit9f8eae3f50d61e2bbe849ce2e9a15a6567a65706 (patch)
treec59dd5c84d7b168458dd6ba9df3bd80eea2c4752 /lib
parent9177afe8ab6d81fc719775c1b85643fcf28097b5 (diff)
downloadnextcloud-server-9f8eae3f50d61e2bbe849ce2e9a15a6567a65706.tar.gz
nextcloud-server-9f8eae3f50d61e2bbe849ce2e9a15a6567a65706.zip
Use more explicit naming for profile link action
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/AppFramework/Bootstrap/RegistrationContext.php16
-rw-r--r--lib/private/Profile/ProfileManager.php2
-rw-r--r--lib/public/AppFramework/Bootstrap/IRegistrationContext.php4
3 files changed, 11 insertions, 11 deletions
diff --git a/lib/private/AppFramework/Bootstrap/RegistrationContext.php b/lib/private/AppFramework/Bootstrap/RegistrationContext.php
index 256d3e2346b..6a9073b576b 100644
--- a/lib/private/AppFramework/Bootstrap/RegistrationContext.php
+++ b/lib/private/AppFramework/Bootstrap/RegistrationContext.php
@@ -63,7 +63,7 @@ class RegistrationContext {
private $dashboardPanels = [];
/** @var ServiceRegistration<ILinkAction>[] */
- private $profileActions = [];
+ private $profileLinkActions = [];
/** @var ServiceFactoryRegistration[] */
private $services = [];
@@ -253,8 +253,8 @@ class RegistrationContext {
);
}
- public function registerProfileAction(string $actionClass): void {
- $this->context->registerProfileAction(
+ public function registerProfileLinkAction(string $actionClass): void {
+ $this->context->registerProfileLinkAction(
$this->appId,
$actionClass
);
@@ -343,10 +343,10 @@ class RegistrationContext {
}
/**
- * @psalm-param class-string<ILinkAction> $capability
+ * @psalm-param class-string<ILinkAction> $actionClass
*/
- public function registerProfileAction(string $appId, string $actionClass): void {
- $this->profileActions[] = new ServiceRegistration($appId, $actionClass);
+ public function registerProfileLinkAction(string $appId, string $actionClass): void {
+ $this->profileLinkActions[] = new ServiceRegistration($appId, $actionClass);
}
/**
@@ -597,7 +597,7 @@ class RegistrationContext {
/**
* @return ServiceRegistration<ILinkAction>[]
*/
- public function getProfileActions(): array {
- return $this->profileActions;
+ public function getProfileLinkActions(): array {
+ return $this->profileLinkActions;
}
}
diff --git a/lib/private/Profile/ProfileManager.php b/lib/private/Profile/ProfileManager.php
index e0c619725e7..bf974e98e0f 100644
--- a/lib/private/Profile/ProfileManager.php
+++ b/lib/private/Profile/ProfileManager.php
@@ -168,7 +168,7 @@ class ProfileManager {
$this->registerAction($targetUser, $visitingUser, $provider);
}
- foreach ($context->getProfileActions() as $registration) {
+ foreach ($context->getProfileLinkActions() as $registration) {
/** @var ILinkAction $provider */
$provider = $this->container->get($registration->getService());
$this->registerAction($targetUser, $visitingUser, $provider);
diff --git a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php
index de391050ec1..3e5aef06e8b 100644
--- a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php
+++ b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php
@@ -255,12 +255,12 @@ interface IRegistrationContext {
/**
* Register an implementation of \OCP\Profile\ILinkAction that
- * will handle the implementation of a profile action
+ * will handle the implementation of a profile link action
*
* @param string $actionClass
* @psalm-param class-string<\OCP\Profile\ILinkAction> $actionClass
* @return void
* @since 23.0.0
*/
- public function registerProfileAction(string $actionClass): void;
+ public function registerProfileLinkAction(string $actionClass): void;
}