Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F118318024
AphrontHeadsupActionView.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
Thu, Jun 19, 06:27
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Jun 21, 06:27 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
26860026
Attached To
rPH Phabricator
AphrontHeadsupActionView.php
View Options
<?php
final
class
AphrontHeadsupActionView
extends
AphrontView
{
private
$name
;
private
$class
;
private
$uri
;
private
$workflow
;
private
$instant
;
public
function
setName
(
$name
)
{
$this
->
name
=
$name
;
return
$this
;
}
public
function
setClass
(
$class
)
{
$this
->
class
=
$class
;
return
$this
;
}
public
function
setURI
(
$uri
)
{
$this
->
uri
=
$uri
;
return
$this
;
}
public
function
setWorkflow
(
$workflow
)
{
$this
->
workflow
=
$workflow
;
return
$this
;
}
public
function
setInstant
(
$instant
)
{
$this
->
instant
=
$instant
;
return
$this
;
}
public
function
render
()
{
if
(
$this
->
instant
)
{
$button_class
=
$this
->
class
.
' link'
;
return
phabricator_render_form
(
$this
->
user
,
array
(
'action'
=>
$this
->
uri
,
'method'
=>
'post'
,
'style'
=>
'display: inline'
,
),
'<button class="'
.
$button_class
.
'">'
.
phutil_escape_html
(
$this
->
name
).
'</button>'
);
}
if
(
$this
->
uri
)
{
$tag
=
'a'
;
}
else
{
$tag
=
'span'
;
}
$attrs
=
array
(
'href'
=>
$this
->
uri
,
'class'
=>
$this
->
class
,
);
if
(
$this
->
workflow
)
{
$attrs
[
'sigil'
]
=
'workflow'
;
}
return
javelin_tag
(
$tag
,
$attrs
,
$this
->
name
);
}
}
Event Timeline
Log In to Comment