Remove product literal strings in "pht()", part 6
[phabricator.git] / src / applications / home / menuitem / PhabricatorHomeLauncherProfileMenuItem.php
blobdbf1586366d66570e4196653fd2e4daeec861b0f
1 <?php
3 final class PhabricatorHomeLauncherProfileMenuItem
4 extends PhabricatorProfileMenuItem {
6 const MENUITEMKEY = 'home.launcher.menu';
8 public function getMenuItemTypeName() {
9 return pht('More Applications');
12 private function getDefaultName() {
13 return pht('More Applications');
16 public function getMenuItemTypeIcon() {
17 return 'fa-ellipsis-h';
20 public function canHideMenuItem(
21 PhabricatorProfileMenuItemConfiguration $config) {
22 return false;
25 public function canMakeDefault(
26 PhabricatorProfileMenuItemConfiguration $config) {
27 return false;
30 public function getDisplayName(
31 PhabricatorProfileMenuItemConfiguration $config) {
32 $name = $config->getMenuItemProperty('name');
34 if (strlen($name)) {
35 return $name;
38 return $this->getDefaultName();
41 public function buildEditEngineFields(
42 PhabricatorProfileMenuItemConfiguration $config) {
43 return array(
44 id(new PhabricatorTextEditField())
45 ->setKey('name')
46 ->setLabel(pht('Name'))
47 ->setPlaceholder($this->getDefaultName())
48 ->setValue($config->getMenuItemProperty('name')),
52 protected function newMenuItemViewList(
53 PhabricatorProfileMenuItemConfiguration $config) {
54 $viewer = $this->getViewer();
56 $name = $this->getDisplayName($config);
57 $icon = 'fa-ellipsis-h';
58 $uri = '/applications/';
60 $item = $this->newItemView()
61 ->setURI($uri)
62 ->setName($name)
63 ->setIcon($icon);
65 return array(
66 $item,