aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Contacts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Contacts')
-rw-r--r--lib/private/Contacts/ContactsMenu/ActionFactory.php20
-rw-r--r--lib/private/Contacts/ContactsMenu/Actions/LinkAction.php14
-rw-r--r--lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php2
-rw-r--r--lib/private/Contacts/ContactsMenu/Providers/ProfileProvider.php2
4 files changed, 15 insertions, 23 deletions
diff --git a/lib/private/Contacts/ContactsMenu/ActionFactory.php b/lib/private/Contacts/ContactsMenu/ActionFactory.php
index 5218582802c..891951a88e5 100644
--- a/lib/private/Contacts/ContactsMenu/ActionFactory.php
+++ b/lib/private/Contacts/ContactsMenu/ActionFactory.php
@@ -29,29 +29,21 @@ use OCP\Contacts\ContactsMenu\ILinkAction;
class ActionFactory implements IActionFactory {
/**
- * @param string $icon
- * @param string $name
- * @param string $href
- * @param string $appName
- * @return ILinkAction
+ * {@inheritDoc}
*/
- public function newLinkAction(string $icon, string $name, string $href, string $appName = ''): ILinkAction {
+ public function newLinkAction(string $icon, string $name, string $href, string $appId = ''): ILinkAction {
$action = new LinkAction();
$action->setName($name);
$action->setIcon($icon);
$action->setHref($href);
- $action->setAppName($appName);
+ $action->setAppId($appId);
return $action;
}
/**
- * @param string $icon
- * @param string $name
- * @param string $email
- * @param string $appName
- * @return ILinkAction
+ * {@inheritDoc}
*/
- public function newEMailAction(string $icon, string $name, string $email, string $appName = ''): ILinkAction {
- return $this->newLinkAction($icon, $name, 'mailto:' . $email, $appName);
+ public function newEMailAction(string $icon, string $name, string $email, string $appId = ''): ILinkAction {
+ return $this->newLinkAction($icon, $name, 'mailto:' . $email, $appId);
}
}
diff --git a/lib/private/Contacts/ContactsMenu/Actions/LinkAction.php b/lib/private/Contacts/ContactsMenu/Actions/LinkAction.php
index a38bad9d82f..5acafed2fda 100644
--- a/lib/private/Contacts/ContactsMenu/Actions/LinkAction.php
+++ b/lib/private/Contacts/ContactsMenu/Actions/LinkAction.php
@@ -39,7 +39,7 @@ class LinkAction implements ILinkAction {
private $priority = 10;
/** @var string */
- private $appName;
+ private $appId;
/**
* @param string $icon absolute URI to an icon
@@ -91,19 +91,19 @@ class LinkAction implements ILinkAction {
}
/**
- * @param string $appName
+ * @param string $appId
* @since 23.0.0
*/
- public function setAppName(string $appName) {
- $this->appName = $appName;
+ public function setAppId(string $appId) {
+ $this->appId = $appId;
}
/**
* @return string
* @since 23.0.0
*/
- public function getAppName(): string {
- return $this->appName;
+ public function getAppId(): string {
+ return $this->appId;
}
/**
@@ -114,7 +114,7 @@ class LinkAction implements ILinkAction {
'title' => $this->name,
'icon' => $this->icon,
'hyperlink' => $this->href,
- 'appName' => $this->appName,
+ 'appId' => $this->appId,
];
}
}
diff --git a/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php b/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php
index 9ae323c18c3..d69f219e84c 100644
--- a/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php
+++ b/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php
@@ -54,7 +54,7 @@ class EMailProvider implements IProvider {
// Skip
continue;
}
- $action = $this->actionFactory->newEMailAction($iconUrl, $address, $address);
+ $action = $this->actionFactory->newEMailAction($iconUrl, $address, $address, 'email');
$entry->addAction($action);
}
}
diff --git a/lib/private/Contacts/ContactsMenu/Providers/ProfileProvider.php b/lib/private/Contacts/ContactsMenu/Providers/ProfileProvider.php
index 4882c0ac883..88370f193a1 100644
--- a/lib/private/Contacts/ContactsMenu/Providers/ProfileProvider.php
+++ b/lib/private/Contacts/ContactsMenu/Providers/ProfileProvider.php
@@ -83,7 +83,7 @@ class ProfileProvider implements IProvider {
$iconUrl = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/profile.svg'));
$profileActionText = $this->l10nFactory->get('core')->t('View profile');
$profileUrl = $this->urlGenerator->linkToRouteAbsolute('core.ProfilePage.index', ['targetUserId' => $targetUserId]);
- $action = $this->actionFactory->newLinkAction($iconUrl, $profileActionText, $profileUrl);
+ $action = $this->actionFactory->newLinkAction($iconUrl, $profileActionText, $profileUrl, 'profile');
// Set highest priority (by descending order), other actions have the default priority 10 as defined in lib/private/Contacts/ContactsMenu/Actions/LinkAction.php
$action->setPriority(20);
$entry->addAction($action);