Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99623449
PhabricatorTimelineView.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, Jan 25, 20:21
Size
1005 B
Mime Type
text/x-php
Expires
Mon, Jan 27, 20:21 (2 d)
Engine
blob
Format
Raw Data
Handle
23834681
Attached To
rPH Phabricator
PhabricatorTimelineView.php
View Options
<?php
final
class
PhabricatorTimelineView
extends
AphrontView
{
private
$events
=
array
();
private
$id
;
public
function
setID
(
$id
)
{
$this
->
id
=
$id
;
return
$this
;
}
public
function
addEvent
(
PhabricatorTimelineEventView
$event
)
{
$this
->
events
[]
=
$event
;
return
$this
;
}
public
function
render
()
{
require_celerity_resource
(
'phabricator-timeline-view-css'
);
$spacer
=
self
::
renderSpacer
();
$events
=
array
();
foreach
(
$this
->
events
as
$event
)
{
$events
[]
=
$spacer
;
$events
[]
=
$this
->
renderSingleView
(
$event
);
}
$events
[]
=
$spacer
;
return
phutil_render_tag
(
'div'
,
array
(
'class'
=>
'phabricator-timeline-view'
,
'id'
=>
$this
->
id
,
),
implode
(
''
,
$events
));
}
public
static
function
renderSpacer
()
{
return
phutil_tag
(
'div'
,
array
(
'class'
=>
'phabricator-timeline-event-view '
.
'phabricator-timeline-spacer'
,
),
''
);
}
}
Event Timeline
Log In to Comment