Remove product literal strings in "pht()", part 18
[phabricator.git] / src / applications / people / menuitem / PhabricatorPeopleRevisionsProfileMenuItem.php
blobcfa760fcd6c60176e3058a6f89e4419c78ee9518
1 <?php
3 final class PhabricatorPeopleRevisionsProfileMenuItem
4 extends PhabricatorProfileMenuItem {
6 const MENUITEMKEY = 'people.revisions';
8 public function getMenuItemTypeName() {
9 return pht('Revisions');
12 private function getDefaultName() {
13 return pht('Revisions');
16 public function canHideMenuItem(
17 PhabricatorProfileMenuItemConfiguration $config) {
18 return true;
21 public function getDisplayName(
22 PhabricatorProfileMenuItemConfiguration $config) {
23 $name = $config->getMenuItemProperty('name');
25 if (strlen($name)) {
26 return $name;
29 return $this->getDefaultName();
32 public function buildEditEngineFields(
33 PhabricatorProfileMenuItemConfiguration $config) {
34 return array(
35 id(new PhabricatorTextEditField())
36 ->setKey('name')
37 ->setLabel(pht('Name'))
38 ->setPlaceholder($this->getDefaultName())
39 ->setValue($config->getMenuItemProperty('name')),
43 protected function newMenuItemViewList(
44 PhabricatorProfileMenuItemConfiguration $config) {
46 $user = $config->getProfileObject();
47 $id = $user->getID();
49 $item = $this->newItemView()
50 ->setURI("/people/revisions/{$id}/")
51 ->setName($this->getDisplayName($config))
52 ->setIcon('fa-gear');
54 return array(
55 $item,