Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / people / icon / PhabricatorPeopleIconSet.php
blobcb34dc40650ee035c71af97e6238895a69cefa91
1 <?php
3 final class PhabricatorPeopleIconSet
4 extends PhabricatorIconSet {
6 const ICONSETKEY = 'people';
8 public function getSelectIconTitleText() {
9 return pht('Choose User Icon');
12 protected function newIcons() {
13 $specifications = self::getIconSpecifications();
15 $icons = array();
16 foreach ($specifications as $spec) {
17 $icons[] = id(new PhabricatorIconSetIcon())
18 ->setKey($spec['key'])
19 ->setIcon($spec['icon'])
20 ->setLabel($spec['name']);
23 return $icons;
26 public static function getDefaultIconKey() {
27 $specifications = self::getIconSpecifications();
29 foreach ($specifications as $spec) {
30 if (idx($spec, 'default')) {
31 return $spec['key'];
35 return null;
38 public static function getIconIcon($key) {
39 $specifications = self::getIconSpecifications();
40 $map = ipull($specifications, 'icon', 'key');
41 return idx($map, $key);
44 public static function getIconName($key) {
45 $specifications = self::getIconSpecifications();
46 $map = ipull($specifications, 'name', 'key');
47 return idx($map, $key);
50 private static function getIconSpecifications() {
51 return self::getDefaultSpecifications();
54 private static function getDefaultSpecifications() {
55 return array(
56 array(
57 'key' => 'person',
58 'icon' => 'fa-user',
59 'name' => pht('User'),
60 'default' => true,
62 array(
63 'key' => 'engineering',
64 'icon' => 'fa-code',
65 'name' => pht('Engineering'),
67 array(
68 'key' => 'operations',
69 'icon' => 'fa-space-shuttle',
70 'name' => pht('Operations'),
72 array(
73 'key' => 'resources',
74 'icon' => 'fa-heart',
75 'name' => pht('Resources'),
77 array(
78 'key' => 'camera',
79 'icon' => 'fa-camera-retro',
80 'name' => pht('Design'),
82 array(
83 'key' => 'music',
84 'icon' => 'fa-headphones',
85 'name' => pht('Musician'),
87 array(
88 'key' => 'spy',
89 'icon' => 'fa-user-secret',
90 'name' => pht('Spy'),
92 array(
93 'key' => 'android',
94 'icon' => 'fa-android',
95 'name' => pht('Bot'),
97 array(
98 'key' => 'relationships',
99 'icon' => 'fa-glass',
100 'name' => pht('Relationships'),
102 array(
103 'key' => 'administration',
104 'icon' => 'fa-fax',
105 'name' => pht('Administration'),
107 array(
108 'key' => 'security',
109 'icon' => 'fa-shield',
110 'name' => pht('Security'),
112 array(
113 'key' => 'logistics',
114 'icon' => 'fa-truck',
115 'name' => pht('Logistics'),
117 array(
118 'key' => 'research',
119 'icon' => 'fa-flask',
120 'name' => pht('Research'),
122 array(
123 'key' => 'analysis',
124 'icon' => 'fa-bar-chart-o',
125 'name' => pht('Analysis'),
127 array(
128 'key' => 'executive',
129 'icon' => 'fa-angle-double-up',
130 'name' => pht('Executive'),
132 array(
133 'key' => 'animal',
134 'icon' => 'fa-paw',
135 'name' => pht('Animal'),