3 final class PhabricatorProjectDetailsProfileMenuItem
4 extends PhabricatorProfileMenuItem
{
6 const MENUITEMKEY
= 'project.details';
8 public function getMenuItemTypeName() {
9 return pht('Project Details');
12 private function getDefaultName() {
13 return pht('Project Details');
16 public function getDisplayName(
17 PhabricatorProfileMenuItemConfiguration
$config) {
18 $default = $this->getDefaultName();
19 return $this->getNameFromConfig($config, $default);
22 public function getMenuItemTypeIcon() {
23 return 'fa-file-text-o';
26 public function canHideMenuItem(
27 PhabricatorProfileMenuItemConfiguration
$config) {
31 public function canMakeDefault(
32 PhabricatorProfileMenuItemConfiguration
$config) {
36 public function buildEditEngineFields(
37 PhabricatorProfileMenuItemConfiguration
$config) {
39 id(new PhabricatorTextEditField())
41 ->setLabel(pht('Name'))
42 ->setPlaceholder($this->getDefaultName())
43 ->setValue($config->getMenuItemProperty('name')),
47 protected function newMenuItemViewList(
48 PhabricatorProfileMenuItemConfiguration
$config) {
50 $project = $config->getProfileObject();
52 $id = $project->getID();
53 $name = $project->getName();
54 $icon = $project->getDisplayIconIcon();
56 $uri = "/project/profile/{$id}/";
58 $item = $this->newItemView()