Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / view / fuel / FuelHandleListView.php
blob77c17ce6685086fb59dcd57ee5530850501c4860
1 <?php
3 final class FuelHandleListView
4 extends FuelComponentView {
6 private $items = array();
8 public function addHandleList(PhabricatorHandleList $list) {
9 $this->items[] = array(
10 'type' => 'list',
11 'item' => $list,
13 return $this;
16 public function render() {
17 require_celerity_resource('fuel-handle-list-css');
19 $items = $this->items;
21 $item_views = array();
22 foreach ($items as $item) {
23 $item_type = $item['type'];
24 $item_item = $item['item'];
26 switch ($item_type) {
27 case 'list':
28 foreach ($item_item as $handle) {
29 $item_views[] = id(new FuelHandleListItemView())
30 ->setHandle($handle);
32 break;
36 $body = phutil_tag(
37 'div',
38 array(
39 'class' => 'fuel-handle-list-body',
41 $item_views);
43 $list = phutil_tag(
44 'div',
45 array(
46 'class' => 'fuel-handle-list',
48 $body);
50 return $this->newComponentTag(
51 'div',
52 array(
53 'class' => 'fuel-handle-list-component',
55 $list);