Remove product literal strings in "pht()", part 18
[phabricator.git] / src / applications / dashboard / controller / PhabricatorDashboardProfileController.php
blobec441658c2cda1109b959eb9082f39bde311d3b2
1 <?php
3 abstract class PhabricatorDashboardProfileController
4 extends PhabricatorController {
6 private $dashboard;
8 public function setDashboard(PhabricatorDashboard $dashboard) {
9 $this->dashboard = $dashboard;
10 return $this;
13 public function getDashboard() {
14 return $this->dashboard;
17 protected function buildHeaderView() {
18 $viewer = $this->getViewer();
19 $dashboard = $this->getDashboard();
20 $id = $dashboard->getID();
22 if ($dashboard->isArchived()) {
23 $status_icon = 'fa-ban';
24 $status_color = 'dark';
25 } else {
26 $status_icon = 'fa-check';
27 $status_color = 'bluegrey';
30 $status_name = idx(
31 PhabricatorDashboard::getStatusNameMap(),
32 $dashboard->getStatus());
34 return id(new PHUIHeaderView())
35 ->setUser($viewer)
36 ->setHeader($dashboard->getName())
37 ->setPolicyObject($dashboard)
38 ->setStatus($status_icon, $status_color, $status_name)
39 ->setHeaderIcon($dashboard->getIcon());
42 protected function buildApplicationCrumbs() {
43 $crumbs = parent::buildApplicationCrumbs();
44 $crumbs->setBorder(true);
46 $dashboard = $this->getDashboard();
47 if ($dashboard) {
48 $crumbs->addTextCrumb($dashboard->getName(), $dashboard->getURI());
51 return $crumbs;