Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F959474
PhabricatorCountdownView.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
PhabricatorCountdownView.php
View Options
<?php
final
class
PhabricatorCountdownView
extends
AphrontTagView
{
private
$countdown
;
private
$headless
;
public
function
setHeadless
(
$headless
)
{
$this
->
headless
=
$headless
;
return
$this
;
}
public
function
setCountdown
(
PhabricatorCountdown
$countdown
)
{
$this
->
countdown
=
$countdown
;
return
$this
;
}
public
function
getTagContent
()
{
$countdown
=
$this
->
countdown
;
require_celerity_resource
(
'phabricator-countdown-css'
);
$header
=
null
;
if
(!
$this
->
headless
)
{
$header
=
phutil_tag
(
'div'
,
array
(
'class'
=>
'phabricator-timer-header'
,
),
array
(
"C"
.
$countdown
->
getID
(),
' '
,
phutil_tag
(
'a'
,
array
(
'href'
=>
'/countdown/'
.
$countdown
->
getID
(),
),
$countdown
->
getTitle
()),
));
}
$ths
=
array
(
phutil_tag
(
'th'
,
array
(),
pht
(
'Days'
)),
phutil_tag
(
'th'
,
array
(),
pht
(
'Hours'
)),
phutil_tag
(
'th'
,
array
(),
pht
(
'Minutes'
)),
phutil_tag
(
'th'
,
array
(),
pht
(
'Seconds'
)),
);
$dashes
=
array
(
javelin_tag
(
'td'
,
array
(
'sigil'
=>
'phabricator-timer-days'
),
'-'
),
javelin_tag
(
'td'
,
array
(
'sigil'
=>
'phabricator-timer-hours'
),
'-'
),
javelin_tag
(
'td'
,
array
(
'sigil'
=>
'phabricator-timer-minutes'
),
'-'
),
javelin_tag
(
'td'
,
array
(
'sigil'
=>
'phabricator-timer-seconds'
),
'-'
),
);
$container
=
celerity_generate_unique_node_id
();
$content
=
phutil_tag
(
'div'
,
array
(
'class'
=>
'phabricator-timer'
,
'id'
=>
$container
),
array
(
$header
,
phutil_tag
(
'table'
,
array
(
'class'
=>
'phabricator-timer-table'
),
array
(
phutil_tag
(
'tr'
,
array
(),
$ths
),
phutil_tag
(
'tr'
,
array
(),
$dashes
),
)),
));
Javelin
::
initBehavior
(
'countdown-timer'
,
array
(
'timestamp'
=>
$countdown
->
getEpoch
(),
'container'
=>
$container
,
));
return
$content
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Jun 17, 10:05 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
226196
Default Alt Text
PhabricatorCountdownView.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment