@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 PHUIBigInfoExample extends PhabricatorUIExample {
4
5 public function getName() {
6 return pht('Big Info View');
7 }
8
9 public function getDescription() {
10 return pht(
11 'Basic New User State information block.');
12 }
13
14 public function renderExample() {
15 $request = $this->getRequest();
16 $viewer = $request->getUser();
17
18 $image = PhabricatorFile::loadBuiltin($viewer,
19 'projects/v3/rocket.png');
20
21 $button = id(new PHUIButtonView())
22 ->setTag('a')
23 ->setText(pht('Launch Away'))
24 ->setColor(PHUIButtonView::GREEN)
25 ->setHref('#');
26
27 $views = array();
28 $views[] = id(new PHUIBigInfoView())
29 ->setTitle(pht('Simply Slim'))
30 ->setDescription(pht('A simple description'))
31 ->addAction($button);
32
33 $views[] = id(new PHUIBigInfoView())
34 ->setTitle(pht('Basicly Basic'))
35 ->setIcon('fa-rocket')
36 ->setDescription(pht('A more basic description'))
37 ->addAction($button);
38
39 $views[] = id(new PHUIBigInfoView())
40 ->setTitle(pht('A Modern Example'))
41 ->setImage($image->getBestURI())
42 ->setDescription(pht('A modern description with lots of frills.'))
43 ->addAction($button);
44
45
46 return phutil_tag_div('ml', $views);
47 }
48}