Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13981665
D14385.id34771.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
7 KB
Referenced Files
None
Subscribers
None
D14385.id34771.diff
View Options
diff --git a/src/applications/auth/controller/PhabricatorAuthController.php b/src/applications/auth/controller/PhabricatorAuthController.php
--- a/src/applications/auth/controller/PhabricatorAuthController.php
+++ b/src/applications/auth/controller/PhabricatorAuthController.php
@@ -2,18 +2,6 @@
abstract class PhabricatorAuthController extends PhabricatorController {
- public function buildStandardPageResponse($view, array $data) {
- $page = $this->buildStandardPageView();
-
- $page->setApplicationName(pht('Login'));
- $page->setBaseURI('/login/');
- $page->setTitle(idx($data, 'title'));
- $page->appendChild($view);
-
- $response = new AphrontWebpageResponse();
- return $response->setContent($page->render());
- }
-
protected function renderErrorPage($title, array $messages) {
$view = new PHUIInfoView();
$view->setTitle($title);
diff --git a/src/applications/feed/controller/PhabricatorFeedController.php b/src/applications/feed/controller/PhabricatorFeedController.php
--- a/src/applications/feed/controller/PhabricatorFeedController.php
+++ b/src/applications/feed/controller/PhabricatorFeedController.php
@@ -2,26 +2,6 @@
abstract class PhabricatorFeedController extends PhabricatorController {
- public function buildStandardPageResponse($view, array $data) {
- $page = $this->buildStandardPageView();
-
- $page->setApplicationName(pht('Feed'));
- $page->setBaseURI('/feed/');
- $page->setTitle(idx($data, 'title'));
- $page->setGlyph("\xE2\x88\x9E");
- $page->appendChild($view);
-
- $response = new AphrontWebpageResponse();
-
- if (!empty($data['public'])) {
- $page->setFrameable(true);
- $page->setShowChrome(false);
- $response->setFrameable(true);
- }
-
- return $response->setContent($page->render());
- }
-
protected function buildSideNavView() {
$user = $this->getRequest()->getUser();
diff --git a/src/applications/help/controller/PhabricatorHelpController.php b/src/applications/help/controller/PhabricatorHelpController.php
--- a/src/applications/help/controller/PhabricatorHelpController.php
+++ b/src/applications/help/controller/PhabricatorHelpController.php
@@ -1,18 +1,3 @@
<?php
-abstract class PhabricatorHelpController extends PhabricatorController {
-
- public function buildStandardPageResponse($view, array $data) {
- $page = $this->buildStandardPageView();
-
- $page->setApplicationName(pht('Help'));
- $page->setBaseURI('/help/');
- $page->setTitle(idx($data, 'title'));
- $page->setGlyph('?');
- $page->appendChild($view);
-
- $response = new AphrontWebpageResponse();
- return $response->setContent($page->render());
- }
-
-}
+abstract class PhabricatorHelpController extends PhabricatorController {}
diff --git a/src/applications/herald/controller/HeraldController.php b/src/applications/herald/controller/HeraldController.php
--- a/src/applications/herald/controller/HeraldController.php
+++ b/src/applications/herald/controller/HeraldController.php
@@ -2,20 +2,6 @@
abstract class HeraldController extends PhabricatorController {
- public function buildStandardPageResponse($view, array $data) {
- $page = $this->buildStandardPageView();
-
- $page->setApplicationName(pht('Herald'));
- $page->setBaseURI('/herald/');
- $page->setTitle(idx($data, 'title'));
- $page->setGlyph("\xE2\x98\xBF");
-
- $page->appendChild($view);
-
- $response = new AphrontWebpageResponse();
- return $response->setContent($page->render());
- }
-
public function buildApplicationMenu() {
return $this->buildSideNavView(true)->getMenu();
}
diff --git a/src/applications/home/controller/PhabricatorHomeController.php b/src/applications/home/controller/PhabricatorHomeController.php
--- a/src/applications/home/controller/PhabricatorHomeController.php
+++ b/src/applications/home/controller/PhabricatorHomeController.php
@@ -2,19 +2,6 @@
abstract class PhabricatorHomeController extends PhabricatorController {
- public function buildStandardPageResponse($view, array $data) {
- $page = $this->buildStandardPageView();
-
- $page->setBaseURI('/');
- $page->setTitle(idx($data, 'title'));
-
- $page->setGlyph("\xE2\x9A\x92");
- $page->appendChild($view);
-
- $response = new AphrontWebpageResponse();
- return $response->setContent($page->render());
- }
-
public function buildNav() {
$user = $this->getRequest()->getUser();
diff --git a/src/applications/notification/controller/PhabricatorNotificationController.php b/src/applications/notification/controller/PhabricatorNotificationController.php
--- a/src/applications/notification/controller/PhabricatorNotificationController.php
+++ b/src/applications/notification/controller/PhabricatorNotificationController.php
@@ -1,21 +1,4 @@
<?php
abstract class PhabricatorNotificationController
- extends PhabricatorController {
-
- public function buildStandardPageResponse($view, array $data) {
-
- $page = $this->buildStandardPageView();
-
- $page->setApplicationName(pht('Notification'));
- $page->setBaseURI('/notification/');
- $page->setTitle(idx($data, 'title'));
- $page->setGlyph('!');
- $page->appendChild($view);
-
- $response = new AphrontWebpageResponse();
- return $response->setContent($page->render());
-
- }
-
-}
+ extends PhabricatorController {}
diff --git a/src/applications/search/controller/PhabricatorSearchBaseController.php b/src/applications/search/controller/PhabricatorSearchBaseController.php
--- a/src/applications/search/controller/PhabricatorSearchBaseController.php
+++ b/src/applications/search/controller/PhabricatorSearchBaseController.php
@@ -8,17 +8,4 @@
const ACTION_BLOCKS = 'blocks';
const ACTION_EDGE = 'edge';
- public function buildStandardPageResponse($view, array $data) {
- $page = $this->buildStandardPageView();
-
- $page->setApplicationName('Search');
- $page->setBaseURI('/search/');
- $page->setTitle(idx($data, 'title'));
- $page->setGlyph("\xC2\xBF");
- $page->appendChild($view);
-
- $response = new AphrontWebpageResponse();
- return $response->setContent($page->render());
- }
-
}
diff --git a/src/docs/contributor/phabricator_code_layout.diviner b/src/docs/contributor/phabricator_code_layout.diviner
--- a/src/docs/contributor/phabricator_code_layout.diviner
+++ b/src/docs/contributor/phabricator_code_layout.diviner
@@ -85,10 +85,9 @@
containing one class, each directory has several classes. A typical example
happens around the CRUD of an object:
- - **DerpBaseController**: typically extends @{class:PhabricatorController},
- implements `buildStandardPageResponse` with the `Derp` application name
- and other `Derp`-specific meta-data, and contains any controller-specific
- functionality used throughout the `Derp` application.
+ - **DerpBaseController**: typically extends @{class:PhabricatorController}
+ and contains any controller-specific functionality used throughout the
+ `Derp` application.
- **DerpDeleteController**: typically extends `DerpBaseController` and
presents a confirmation dialogue to the user about deleting a `Derp`.
- **DerpEditController**: typically extends `DerpBaseController` and
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 20, 6:17 PM (4 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6718827
Default Alt Text
D14385.id34771.diff (7 KB)
Attached To
Mode
D14385: Remove some low-hanging buildStandardPageResponse() methods
Attached
Detach File
Event Timeline
Log In to Comment