@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3final class FuelMapItemView
4 extends AphrontView {
5
6 private $name;
7 private $value;
8
9 public function setName($name) {
10 $this->name = $name;
11 return $this;
12 }
13
14 public function getName() {
15 return $this->name;
16 }
17
18 public function setValue($value) {
19 $this->value = $value;
20 return $this;
21 }
22
23 public function getValue() {
24 return $this->value;
25 }
26
27 public function render() {
28 $value = $this->getValue();
29
30 $view = array();
31
32 $view[] = phutil_tag(
33 'div',
34 array(
35 'class' => 'fuel-map-name',
36 ),
37 $this->getName());
38
39 $view[] = phutil_tag(
40 'div',
41 array(
42 'class' => 'fuel-map-value',
43 ),
44 $value);
45
46 return phutil_tag(
47 'div',
48 array(
49 'class' => 'fuel-map-pair',
50 ),
51 $view);
52 }
53
54}