3 final class PHUISegmentBarView
extends AphrontTagView
{
6 private $segments = array();
8 public function setLabel($label) {
13 public function newSegment() {
14 $segment = new PHUISegmentBarSegmentView();
15 $this->segments
[] = $segment;
19 protected function canAppendChild() {
23 protected function getTagAttributes() {
25 'class' => 'phui-segment-bar-view',
29 protected function getTagContent() {
30 require_celerity_resource('phui-segment-bar-view-css');
32 $label = $this->label
;
37 'class' => 'phui-segment-bar-label',
42 $segments = $this->segments
;
45 foreach ($segments as $segment) {
46 $segment->setPosition($position);
47 $position +
= $segment->getWidth();
50 $segments = array_reverse($segments);
52 $segments = phutil_tag(
55 'class' => 'phui-segment-bar-segments',