LogoKolab Groupware OBS > Projects
Log In

View File 0015-Revert-Removed-unused-buildApplicationPage-method-fr.patch of Package phabricator (Project Infrastructure)

From 51700eefb429988b8b92592463204459fac11ddb Mon Sep 17 00:00:00 2001
From: "Jeroen van Meeuwen (Kolab Systems)" <vanmeeuwen@kolabsys.com>
Date: Thu, 8 Sep 2016 16:57:03 +0200
Subject: [PATCH 15/15] Revert "Removed unused buildApplicationPage method from
 PhabricatorController"

This reverts commit 2201c65eb73fb99b8625bea45c273d262f2c289f.
---
 .../base/controller/PhabricatorController.php      | 40 ++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/src/applications/base/controller/PhabricatorController.php b/src/applications/base/controller/PhabricatorController.php
index f2b267b..0cb8182 100644
--- a/src/applications/base/controller/PhabricatorController.php
+++ b/src/applications/base/controller/PhabricatorController.php
@@ -575,4 +575,44 @@ abstract class PhabricatorController extends AphrontController {
     return $page->produceAphrontResponse();
   }
 
+
+  /**
+   * DEPRECATED. Use @{method:newPage}.
+   */
+  public function buildApplicationPage($view, array $options) {
+    $page = $this->newPage();
+
+    $title = PhabricatorEnv::getEnvConfig('phabricator.serious-business') ?
+      'Phabricator' :
+      pht('Bacon Ice Cream for Breakfast');
+
+    $page->setTitle(idx($options, 'title', $title));
+
+    if (idx($options, 'class')) {
+      $page->addClass($options['class']);
+    }
+
+    if (!($view instanceof AphrontSideNavFilterView)) {
+      $nav = new AphrontSideNavFilterView();
+      $nav->appendChild($view);
+      $view = $nav;
+    }
+
+    $page->appendChild($view);
+
+    $object_phids = idx($options, 'pageObjects', array());
+    if ($object_phids) {
+      $page->setPageObjectPHIDs($object_phids);
+    }
+
+    if (!idx($options, 'device', true)) {
+      $page->setDeviceReady(false);
+    }
+
+    $page->setShowFooter(idx($options, 'showFooter', true));
+    $page->setShowChrome(idx($options, 'chrome', true));
+
+    return $page->produceAphrontResponse();
+  }
+
 }
-- 
2.9.3