Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F992667
PhabricatorMainMenuIconView.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorMainMenuIconView.php
View Options
<?php
final
class
PhabricatorMainMenuIconView
extends
AphrontView
{
private
$classes
=
array
();
private
$href
;
private
$name
;
private
$sortOrder
=
0.5
;
private
$workflow
;
private
$style
;
public
function
setName
(
$name
)
{
$this
->
name
=
$name
;
return
$this
;
}
public
function
setWorkflow
(
$workflow
)
{
$this
->
workflow
=
$workflow
;
return
$this
;
}
public
function
getName
()
{
return
$this
->
name
;
}
public
function
setHref
(
$href
)
{
$this
->
href
=
$href
;
return
$this
;
}
public
function
getHref
()
{
return
$this
->
href
;
}
public
function
addClass
(
$class
)
{
$this
->
classes
[]
=
$class
;
return
$this
;
}
public
function
addStyle
(
$style
)
{
$this
->
style
=
$style
;
return
$this
;
}
/**
* Provide a float, where 0.0 is the profile item and 1.0 is the logout
* item. Normally you should pick something between the two.
*
* @param float Sort order.
* @return this
*/
public
function
setSortOrder
(
$sort_order
)
{
$this
->
sortOrder
=
$sort_order
;
return
$this
;
}
public
function
getSortOrder
()
{
return
$this
->
sortOrder
;
}
public
function
render
()
{
$name
=
$this
->
getName
();
$href
=
$this
->
getHref
();
$classes
=
$this
->
classes
;
$classes
[]
=
'phabricator-main-menu-icon'
;
$label
=
javelin_tag
(
'a'
,
array
(
'href'
=>
$href
,
'class'
=>
'phabricator-main-menu-icon-label'
,
),
$name
);
$item
=
javelin_tag
(
'a'
,
array
(
'href'
=>
$href
,
'class'
=>
implode
(
' '
,
$classes
),
'style'
=>
$this
->
style
,
'sigil'
=>
$this
->
workflow
?
'workflow'
:
null
,
),
''
);
$group
=
new
PhabricatorMainMenuGroupView
();
$group
->
appendChild
(
$item
);
$group
->
appendChild
(
$label
);
return
$group
->
render
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Jun 18, 10:56 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
232365
Default Alt Text
PhabricatorMainMenuIconView.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment