Skip to content

Commit

Permalink
Merge pull request #29435 from nextcloud/explicitly-name-profile-link…
Browse files Browse the repository at this point in the history
…-action
  • Loading branch information
skjnldsv authored Oct 26, 2021
2 parents f9629c0 + 9f8eae3 commit 1b366a0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions lib/private/AppFramework/Bootstrap/RegistrationContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class RegistrationContext {
private $dashboardPanels = [];

/** @var ServiceRegistration<ILinkAction>[] */
private $profileActions = [];
private $profileLinkActions = [];

/** @var ServiceFactoryRegistration[] */
private $services = [];
Expand Down Expand Up @@ -253,8 +253,8 @@ public function registerCalendarProvider(string $class): void {
);
}

public function registerProfileAction(string $actionClass): void {
$this->context->registerProfileAction(
public function registerProfileLinkAction(string $actionClass): void {
$this->context->registerProfileLinkAction(
$this->appId,
$actionClass
);
Expand Down Expand Up @@ -343,10 +343,10 @@ public function registerCalendarProvider(string $appId, string $class): void {
}

/**
* @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);
}

/**
Expand Down Expand Up @@ -597,7 +597,7 @@ public function getCalendarProviders(): array {
/**
* @return ServiceRegistration<ILinkAction>[]
*/
public function getProfileActions(): array {
return $this->profileActions;
public function getProfileLinkActions(): array {
return $this->profileLinkActions;
}
}
2 changes: 1 addition & 1 deletion lib/private/Profile/ProfileManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ private function getActions(IUser $targetUser, ?IUser $visitingUser): array {
$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);
Expand Down
4 changes: 2 additions & 2 deletions lib/public/AppFramework/Bootstrap/IRegistrationContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,12 @@ public function registerCalendarProvider(string $class): void;

/**
* 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;
}

0 comments on commit 1b366a0

Please sign in to comment.