Page MenuHomePhabricator

D17437.diff
No OneTemporary

D17437.diff

diff --git a/src/applications/search/menuitem/PhabricatorLinkProfileMenuItem.php b/src/applications/search/menuitem/PhabricatorLinkProfileMenuItem.php
--- a/src/applications/search/menuitem/PhabricatorLinkProfileMenuItem.php
+++ b/src/applications/search/menuitem/PhabricatorLinkProfileMenuItem.php
@@ -7,6 +7,7 @@
const FIELD_URI = 'uri';
const FIELD_NAME = 'name';
+ const FIELD_TOOLTIP = 'tooltip';
public function getMenuItemTypeIcon() {
return 'fa-link';
@@ -38,6 +39,10 @@
->setLabel(pht('URI'))
->setIsRequired(true)
->setValue($this->getLinkURI($config)),
+ id(new PhabricatorTextEditField())
+ ->setKey(self::FIELD_TOOLTIP)
+ ->setLabel(pht('Tooltip'))
+ ->setValue($this->getLinkTooltip($config)),
id(new PhabricatorIconSetEditField())
->setKey('icon')
->setLabel(pht('Icon'))
@@ -61,6 +66,11 @@
return $config->getMenuItemProperty('uri');
}
+ private function getLinkTooltip(
+ PhabricatorProfileMenuItemConfiguration $config) {
+ return $config->getMenuItemProperty('tooltip');
+ }
+
private function isValidLinkURI($uri) {
return PhabricatorEnv::isValidURIForLink($uri);
}
@@ -71,6 +81,7 @@
$icon = $this->getLinkIcon($config);
$name = $this->getLinkName($config);
$href = $this->getLinkURI($config);
+ $tooltip = $this->getLinkTooltip($config);
if (!$this->isValidLinkURI($href)) {
$href = '#';
@@ -87,7 +98,8 @@
$item = $this->newItem()
->setHref($href)
->setName($name)
- ->setIcon($icon_class);
+ ->setIcon($icon_class)
+ ->setTooltip($tooltip);
return array(
$item,

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 11:28 AM (18 h, 20 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6782502
Default Alt Text
D17437.diff (1 KB)

Event Timeline