mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-15 03:12:41 +01:00
36 lines
779 B
PHP
36 lines
779 B
PHP
|
<?php
|
||
|
|
||
|
final class PhabricatorTimelineView extends AphrontView {
|
||
|
|
||
|
private $events = array();
|
||
|
|
||
|
public function addEvent(PhabricatorTimelineEventView $event) {
|
||
|
$this->events[] = $event;
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
public function render() {
|
||
|
require_celerity_resource('phabricator-timeline-view-css');
|
||
|
|
||
|
$events = array();
|
||
|
foreach ($this->events as $event) {
|
||
|
$events[] = phutil_render_tag(
|
||
|
'div',
|
||
|
array(
|
||
|
'class' => 'phabricator-timeline-event-view '.
|
||
|
'phabricator-timeline-spacer',
|
||
|
),
|
||
|
'');
|
||
|
$events[] = $this->renderSingleView($event);
|
||
|
}
|
||
|
|
||
|
return phutil_render_tag(
|
||
|
'div',
|
||
|
array(
|
||
|
'class' => 'phabricator-timeline-view',
|
||
|
),
|
||
|
implode('', $events));
|
||
|
}
|
||
|
|
||
|
}
|