Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101913854
PhabricatorPeopleMainMenuBarExtension.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Feb 15, 02:12
Size
932 B
Mime Type
text/x-php
Expires
Mon, Feb 17, 02:12 (1 d, 13 h)
Engine
blob
Format
Raw Data
Handle
24244481
Attached To
rPH Phabricator
PhabricatorPeopleMainMenuBarExtension.php
View Options
<?php
final
class
PhabricatorPeopleMainMenuBarExtension
extends
PhabricatorMainMenuBarExtension
{
const
MAINMENUBARKEY
=
'people'
;
public
function
buildMainMenus
()
{
$viewer
=
$this
->
getViewer
();
$image
=
$viewer
->
getProfileImageURI
();
$bar_item
=
id
(
new
PHUIListItemView
())
->
setName
(
$viewer
->
getUsername
())
->
setHref
(
'/p/'
.
$viewer
->
getUsername
().
'/'
)
->
addClass
(
'core-menu-item'
)
->
setAural
(
pht
(
'Profile'
));
$classes
=
array
(
'phabricator-core-menu-icon'
,
'phabricator-core-menu-profile-image'
,
);
$bar_item
->
appendChild
(
phutil_tag
(
'span'
,
array
(
'class'
=>
implode
(
' '
,
$classes
),
'style'
=>
'background-image: url('
.
$image
.
')'
,
),
''
));
$profile_menu
=
id
(
new
PHUIMainMenuView
())
->
setOrder
(
100
)
->
setMenuBarItem
(
$bar_item
);
return
array
(
$profile_menu
,
);
}
}
Event Timeline
Log In to Comment