@@ -43,13 +43,14 @@ public function renderExample() {
43
43
$ events [] = id (new PhabricatorTimelineEventView ())
44
44
->setUserHandle ($ handle )
45
45
->setTitle ('Major Red Event ' )
46
+ ->setIcon ('love ' )
46
47
->appendChild ('This event is red! ' )
47
- ->addClass ( ' phabricator-timeline-red ' );
48
+ ->setColor (PhabricatorTransactions:: COLOR_RED );
48
49
49
50
$ events [] = id (new PhabricatorTimelineEventView ())
50
51
->setUserHandle ($ handle )
51
52
->setTitle ('Minor Red Event ' )
52
- ->addClass ( ' phabricator-timeline-red ' );
53
+ ->setColor (PhabricatorTransactions:: COLOR_RED );
53
54
54
55
$ events [] = id (new PhabricatorTimelineEventView ())
55
56
->setUserHandle ($ handle )
@@ -58,24 +59,43 @@ public function renderExample() {
58
59
$ events [] = id (new PhabricatorTimelineEventView ())
59
60
->setUserHandle ($ handle )
60
61
->setTitle ('Minor Red Event ' )
61
- ->addClass ( ' phabricator-timeline-red ' );
62
+ ->setColor (PhabricatorTransactions:: COLOR_RED );
62
63
63
64
$ events [] = id (new PhabricatorTimelineEventView ())
64
65
->setUserHandle ($ handle )
65
66
->setTitle ('Minor Not-Red Event ' );
66
67
67
68
$ events [] = id (new PhabricatorTimelineEventView ())
68
69
->setUserHandle ($ handle )
69
- ->setTitle ('Unstyled event ' )
70
- ->appendChild ('This event disables standard title and content styling. ' )
71
- ->setDisableStandardTitleStyle (true )
72
- ->setDisableStandardContentStyle (true );
70
+ ->setTitle ('Major Green Event ' )
71
+ ->appendChild ('This event is green! ' )
72
+ ->setColor (PhabricatorTransactions::COLOR_GREEN );
73
+
74
+ $ colors = array (
75
+ PhabricatorTransactions::COLOR_RED ,
76
+ PhabricatorTransactions::COLOR_ORANGE ,
77
+ PhabricatorTransactions::COLOR_YELLOW ,
78
+ PhabricatorTransactions::COLOR_GREEN ,
79
+ PhabricatorTransactions::COLOR_SKY ,
80
+ PhabricatorTransactions::COLOR_BLUE ,
81
+ PhabricatorTransactions::COLOR_INDIGO ,
82
+ PhabricatorTransactions::COLOR_VIOLET ,
83
+ PhabricatorTransactions::COLOR_GREY ,
84
+ PhabricatorTransactions::COLOR_BLACK ,
85
+ );
73
86
74
87
$ events [] = id (new PhabricatorTimelineEventView ())
75
88
->setUserHandle ($ handle )
76
- ->setTitle ('Major Green Event ' )
77
- ->appendChild ('This event is green! ' )
78
- ->addClass ('phabricator-timeline-green ' );
89
+ ->setTitle (phutil_escape_html ("Colorless " ))
90
+ ->setIcon ('lock ' );
91
+
92
+ foreach ($ colors as $ color ) {
93
+ $ events [] = id (new PhabricatorTimelineEventView ())
94
+ ->setUserHandle ($ handle )
95
+ ->setTitle (phutil_escape_html ("Color ' {$ color }' " ))
96
+ ->setIcon ('lock ' )
97
+ ->setColor ($ color );
98
+ }
79
99
80
100
$ timeline = id (new PhabricatorTimelineView ());
81
101
foreach ($ events as $ event ) {
0 commit comments