Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101475575
PhabricatorMainMenuIconView.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
Mon, Feb 10, 19:57
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Feb 12, 19:57 (2 d)
Engine
blob
Format
Raw Data
Handle
24145023
Attached To
rPH Phabricator
PhabricatorMainMenuIconView.php
View Options
<?php
final
class
PhabricatorMainMenuIconView
extends
AphrontView
{
private
$classes
=
array
();
private
$href
;
private
$name
;
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
;
}
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
();
}
}
Event Timeline
Log In to Comment