PhabricatorProjectProfileMenuEngine.php 1.88 KB
Newer Older
1
2
<?php

3
4
final class PhabricatorProjectProfileMenuEngine
  extends PhabricatorProfileMenuEngine {
5

6
  protected function isMenuEngineConfigurable() {
7
8
9
    return true;
  }

10
11
12
13
  protected function isMenuEnginePersonalizable() {
    return false;
  }

14
  public function getItemURI($path) {
15
16
    $project = $this->getProfileObject();
    $id = $project->getID();
17
    return "/project/{$id}/item/{$path}";
18
19
  }

20
21
  protected function getBuiltinProfileItems($object) {
    $items = array();
22

23
    $items[] = $this->newItem()
24
      ->setBuiltinKey(PhabricatorProject::ITEM_PICTURE)
25
26
      ->setMenuItemKey(PhabricatorProjectPictureProfileMenuItem::MENUITEMKEY)
      ->setIsHeadItem(true);
27
28

    $items[] = $this->newItem()
29
30
      ->setBuiltinKey(PhabricatorProject::ITEM_PROFILE)
      ->setMenuItemKey(PhabricatorProjectDetailsProfileMenuItem::MENUITEMKEY);
31

32
33
34
    $items[] = $this->newItem()
      ->setBuiltinKey(PhabricatorProject::ITEM_POINTS)
      ->setMenuItemKey(PhabricatorProjectPointsProfileMenuItem::MENUITEMKEY);
35

36
37
38
    $items[] = $this->newItem()
      ->setBuiltinKey(PhabricatorProject::ITEM_WORKBOARD)
      ->setMenuItemKey(PhabricatorProjectWorkboardProfileMenuItem::MENUITEMKEY);
39

40
41
42
43
    $items[] = $this->newItem()
      ->setBuiltinKey(PhabricatorProject::ITEM_REPORTS)
      ->setMenuItemKey(PhabricatorProjectReportsProfileMenuItem::MENUITEMKEY);

44
45
46
47
    $items[] = $this->newItem()
      ->setBuiltinKey(PhabricatorProject::ITEM_SUBPROJECTS)
      ->setMenuItemKey(
        PhabricatorProjectSubprojectsProfileMenuItem::MENUITEMKEY);
48

49
50
51
52
    $items[] = $this->newItem()
      ->setBuiltinKey(PhabricatorProject::ITEM_MEMBERS)
      ->setMenuItemKey(PhabricatorProjectMembersProfileMenuItem::MENUITEMKEY);

epriestley's avatar
epriestley committed
53
54
    $items[] = $this->newItem()
      ->setBuiltinKey(PhabricatorProject::ITEM_MANAGE)
55
56
      ->setMenuItemKey(PhabricatorProjectManageProfileMenuItem::MENUITEMKEY)
      ->setIsTailItem(true);
Chad Little's avatar
Chad Little committed
57

58
    return $items;
59
60
61
  }

}