Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / project / menuitem / PhabricatorProjectMembersProfileMenuItem.php
blob777054547dede98978ae8a97335d560b0b5a0f14
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 getDisplayName(
17 PhabricatorProfileMenuItemConfiguration $config) {
18 $default = $this->getDefaultName();
19 return $this->getNameFromConfig($config, $default);
22 public function getMenuItemTypeIcon() {
23 return 'fa-users';
26 public function buildEditEngineFields(
27 PhabricatorProfileMenuItemConfiguration $config) {
28 return array(
29 id(new PhabricatorTextEditField())
30 ->setKey('name')
31 ->setLabel(pht('Name'))
32 ->setPlaceholder($this->getDefaultName())
33 ->setValue($config->getMenuItemProperty('name')),
37 protected function newMenuItemViewList(
38 PhabricatorProfileMenuItemConfiguration $config) {
40 $project = $config->getProfileObject();
42 $id = $project->getID();
44 $name = $this->getDisplayName($config);
45 $icon = 'fa-group';
46 $uri = "/project/members/{$id}/";
48 $item = $this->newItemView()
49 ->setURI($uri)
50 ->setName($name)
51 ->setIcon($icon);
53 return array(
54 $item,