2016-01-14 23:34:21 +01:00
|
|
|
<?php
|
|
|
|
|
2016-12-11 19:08:26 +01:00
|
|
|
final class PhabricatorDividerProfileMenuItem
|
|
|
|
extends PhabricatorProfileMenuItem {
|
2016-01-14 23:34:21 +01:00
|
|
|
|
2016-12-11 19:08:26 +01:00
|
|
|
const MENUITEMKEY = 'divider';
|
2016-01-14 23:34:21 +01:00
|
|
|
|
2016-12-11 19:08:26 +01:00
|
|
|
public function getMenuItemTypeIcon() {
|
2016-01-14 23:34:21 +01:00
|
|
|
return 'fa-minus';
|
|
|
|
}
|
|
|
|
|
2016-12-11 19:08:26 +01:00
|
|
|
public function getMenuItemTypeName() {
|
2016-01-14 23:34:21 +01:00
|
|
|
return pht('Divider');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function canAddToObject($object) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getDisplayName(
|
2016-12-11 18:38:06 +01:00
|
|
|
PhabricatorProfileMenuItemConfiguration $config) {
|
2016-01-14 23:34:21 +01:00
|
|
|
return pht("\xE2\x80\x94");
|
|
|
|
}
|
|
|
|
|
|
|
|
public function buildEditEngineFields(
|
2016-12-11 18:38:06 +01:00
|
|
|
PhabricatorProfileMenuItemConfiguration $config) {
|
2016-01-14 23:34:21 +01:00
|
|
|
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(
|
2016-12-11 18:38:06 +01:00
|
|
|
PhabricatorProfileMenuItemConfiguration $config) {
|
2016-01-14 23:34:21 +01:00
|
|
|
|
|
|
|
$item = $this->newItem()
|
2017-02-01 04:47:57 +01:00
|
|
|
->setType(PHUIListItemView::TYPE_DIVIDER)
|
2016-01-14 23:34:21 +01:00
|
|
|
->addClass('phui-divider');
|
|
|
|
|
|
|
|
return array(
|
|
|
|
$item,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|