Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / project / menuitem / PhabricatorProjectMembersProfileMenuItem.php
blob11a57d3a5b4a9e9d9d8f006c01cbc7f59d5cabcc
1 <?php
3 final class PhabricatorProjectMembersProfileMenuItem
4 extends PhabricatorProfileMenuItem {
6 const MENUITEMKEY = 'project.members';
8 public function getMenuItemTypeName() {
9 return pht('Project Members');
12 private function getDefaultName() {
13 return pht('Members');
16 public function getMenuItemTypeIcon() {
17 return 'fa-users';
20 public function getDisplayName(
21 PhabricatorProfileMenuItemConfiguration $config) {
22 $name = $config->getMenuItemProperty('name');
24 if (strlen($name)) {
25 return $name;
28 return $this->getDefaultName();
31 public function buildEditEngineFields(
32 PhabricatorProfileMenuItemConfiguration $config) {
33 return array(
34 id(new PhabricatorTextEditField())
35 ->setKey('name')
36 ->setLabel(pht('Name'))
37 ->setPlaceholder($this->getDefaultName())
38 ->setValue($config->getMenuItemProperty('name')),
42 protected function newMenuItemViewList(
43 PhabricatorProfileMenuItemConfiguration $config) {
45 $project = $config->getProfileObject();
47 $id = $project->getID();
49 $name = $this->getDisplayName($config);
50 $icon = 'fa-group';
51 $uri = "/project/members/{$id}/";
53 $item = $this->newItemView()
54 ->setURI($uri)
55 ->setName($name)
56 ->setIcon($icon);
58 return array(
59 $item,