mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-15 19:32:40 +01:00
7fc8e19786
Summary: Ref T12174. Always sets the correct type when converting to ActionList, adds a type to Divider. Test Plan: Add a Label, 2 applications to the personal favorites menu, see nice styles. {F2554901} Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T12174 Differential Revision: https://secure.phabricator.com/D17285
49 lines
1.1 KiB
PHP
49 lines
1.1 KiB
PHP
<?php
|
|
|
|
final class PhabricatorDividerProfileMenuItem
|
|
extends PhabricatorProfileMenuItem {
|
|
|
|
const MENUITEMKEY = 'divider';
|
|
|
|
public function getMenuItemTypeIcon() {
|
|
return 'fa-minus';
|
|
}
|
|
|
|
public function getMenuItemTypeName() {
|
|
return pht('Divider');
|
|
}
|
|
|
|
public function canAddToObject($object) {
|
|
return true;
|
|
}
|
|
|
|
public function getDisplayName(
|
|
PhabricatorProfileMenuItemConfiguration $config) {
|
|
return pht("\xE2\x80\x94");
|
|
}
|
|
|
|
public function buildEditEngineFields(
|
|
PhabricatorProfileMenuItemConfiguration $config) {
|
|
return array(
|
|
id(new PhabricatorInstructionsEditField())
|
|
->setValue(
|
|
pht(
|
|
'This is a visual divider which you can use to separate '.
|
|
'sections in the menu. It does not have any configurable '.
|
|
'options.')),
|
|
);
|
|
}
|
|
|
|
protected function newNavigationMenuItems(
|
|
PhabricatorProfileMenuItemConfiguration $config) {
|
|
|
|
$item = $this->newItem()
|
|
->setType(PHUIListItemView::TYPE_DIVIDER)
|
|
->addClass('phui-divider');
|
|
|
|
return array(
|
|
$item,
|
|
);
|
|
}
|
|
|
|
}
|