@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
at recaptime-dev/main 42 lines 947 B view raw
1<?php 2 3abstract class PhabricatorConfigController extends PhabricatorController { 4 5 public function shouldRequireAdmin() { 6 return true; 7 } 8 9 public function buildHeaderView($text, $action = null) { 10 $viewer = $this->getViewer(); 11 12 $file = PhabricatorFile::loadBuiltin($viewer, 'projects/v3/manage.png'); 13 $image = $file->getBestURI(); 14 $header = id(new PHUIHeaderView()) 15 ->setHeader($text) 16 ->setProfileHeader(true) 17 ->setImage($image); 18 19 if ($action) { 20 $header->addActionLink($action); 21 } 22 23 return $header; 24 } 25 26 public function buildConfigBoxView($title, $content, $action = null) { 27 $header = id(new PHUIHeaderView()) 28 ->setHeader($title); 29 30 if ($action) { 31 $header->addActionItem($action); 32 } 33 34 $view = id(new PHUIObjectBoxView()) 35 ->setHeader($header) 36 ->appendChild($content) 37 ->setBackground(PHUIObjectBoxView::WHITE_CONFIG); 38 39 return $view; 40 } 41 42}