Remove all "FileHasObject" edge reads and writes
[phabricator.git] / src / applications / config / controller / PhabricatorConfigController.php
blobbcdaf968fc7f8acae597681f8da0388b07ab0624
1 <?php
3 abstract class PhabricatorConfigController extends PhabricatorController {
5 public function shouldRequireAdmin() {
6 return true;
9 public function buildHeaderView($text, $action = null) {
10 $viewer = $this->getViewer();
12 $file = PhabricatorFile::loadBuiltin($viewer, 'projects/v3/manage.png');
13 $image = $file->getBestURI($file);
14 $header = id(new PHUIHeaderView())
15 ->setHeader($text)
16 ->setProfileHeader(true)
17 ->setImage($image);
19 if ($action) {
20 $header->addActionLink($action);
23 return $header;
26 public function buildConfigBoxView($title, $content, $action = null) {
27 $header = id(new PHUIHeaderView())
28 ->setHeader($title);
30 if ($action) {
31 $header->addActionItem($action);
34 $view = id(new PHUIObjectBoxView())
35 ->setHeader($header)
36 ->appendChild($content)
37 ->setBackground(PHUIObjectBoxView::WHITE_CONFIG);
39 return $view;