Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15447833
D15428.id37191.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
10 KB
Referenced Files
None
Subscribers
None
D15428.id37191.diff
View Options
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -1433,6 +1433,7 @@
'NuancePhabricatorFormSourceDefinition' => 'applications/nuance/source/NuancePhabricatorFormSourceDefinition.php',
'NuanceQuery' => 'applications/nuance/query/NuanceQuery.php',
'NuanceQueue' => 'applications/nuance/storage/NuanceQueue.php',
+ 'NuanceQueueController' => 'applications/nuance/controller/NuanceQueueController.php',
'NuanceQueueDatasource' => 'applications/nuance/typeahead/NuanceQueueDatasource.php',
'NuanceQueueEditController' => 'applications/nuance/controller/NuanceQueueEditController.php',
'NuanceQueueEditor' => 'applications/nuance/editor/NuanceQueueEditor.php',
@@ -1457,6 +1458,7 @@
'NuanceSchemaSpec' => 'applications/nuance/storage/NuanceSchemaSpec.php',
'NuanceSource' => 'applications/nuance/storage/NuanceSource.php',
'NuanceSourceActionController' => 'applications/nuance/controller/NuanceSourceActionController.php',
+ 'NuanceSourceController' => 'applications/nuance/controller/NuanceSourceController.php',
'NuanceSourceCreateController' => 'applications/nuance/controller/NuanceSourceCreateController.php',
'NuanceSourceDefaultEditCapability' => 'applications/nuance/capability/NuanceSourceDefaultEditCapability.php',
'NuanceSourceDefaultViewCapability' => 'applications/nuance/capability/NuanceSourceDefaultViewCapability.php',
@@ -5678,17 +5680,18 @@
'PhabricatorPolicyInterface',
'PhabricatorApplicationTransactionInterface',
),
+ 'NuanceQueueController' => 'NuanceController',
'NuanceQueueDatasource' => 'PhabricatorTypeaheadDatasource',
- 'NuanceQueueEditController' => 'NuanceController',
+ 'NuanceQueueEditController' => 'NuanceQueueController',
'NuanceQueueEditor' => 'PhabricatorApplicationTransactionEditor',
- 'NuanceQueueListController' => 'NuanceController',
+ 'NuanceQueueListController' => 'NuanceQueueController',
'NuanceQueuePHIDType' => 'PhabricatorPHIDType',
'NuanceQueueQuery' => 'NuanceQuery',
'NuanceQueueSearchEngine' => 'PhabricatorApplicationSearchEngine',
'NuanceQueueTransaction' => 'NuanceTransaction',
'NuanceQueueTransactionComment' => 'PhabricatorApplicationTransactionComment',
'NuanceQueueTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
- 'NuanceQueueViewController' => 'NuanceController',
+ 'NuanceQueueViewController' => 'NuanceQueueController',
'NuanceRequestor' => array(
'NuanceDAO',
'PhabricatorPolicyInterface',
@@ -5710,14 +5713,15 @@
'PhabricatorPolicyInterface',
),
'NuanceSourceActionController' => 'NuanceController',
- 'NuanceSourceCreateController' => 'NuanceController',
+ 'NuanceSourceController' => 'NuanceController',
+ 'NuanceSourceCreateController' => 'NuanceSourceController',
'NuanceSourceDefaultEditCapability' => 'PhabricatorPolicyCapability',
'NuanceSourceDefaultViewCapability' => 'PhabricatorPolicyCapability',
'NuanceSourceDefinition' => 'Phobject',
'NuanceSourceDefinitionTestCase' => 'PhabricatorTestCase',
- 'NuanceSourceEditController' => 'NuanceController',
+ 'NuanceSourceEditController' => 'NuanceSourceController',
'NuanceSourceEditor' => 'PhabricatorApplicationTransactionEditor',
- 'NuanceSourceListController' => 'NuanceController',
+ 'NuanceSourceListController' => 'NuanceSourceController',
'NuanceSourceManageCapability' => 'PhabricatorPolicyCapability',
'NuanceSourcePHIDType' => 'PhabricatorPHIDType',
'NuanceSourceQuery' => 'NuanceQuery',
@@ -5725,7 +5729,7 @@
'NuanceSourceTransaction' => 'NuanceTransaction',
'NuanceSourceTransactionComment' => 'PhabricatorApplicationTransactionComment',
'NuanceSourceTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
- 'NuanceSourceViewController' => 'NuanceController',
+ 'NuanceSourceViewController' => 'NuanceSourceController',
'NuanceTransaction' => 'PhabricatorApplicationTransaction',
'OwnersConduitAPIMethod' => 'ConduitAPIMethod',
'OwnersEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
diff --git a/src/applications/nuance/controller/NuanceQueueController.php b/src/applications/nuance/controller/NuanceQueueController.php
new file mode 100644
--- /dev/null
+++ b/src/applications/nuance/controller/NuanceQueueController.php
@@ -0,0 +1,11 @@
+<?php
+
+abstract class NuanceQueueController
+ extends NuanceController {
+
+ public function buildApplicationMenu() {
+ return $this->newApplicationMenu()
+ ->setSearchEngine(new NuanceQueueSearchEngine());
+ }
+
+}
diff --git a/src/applications/nuance/controller/NuanceQueueEditController.php b/src/applications/nuance/controller/NuanceQueueEditController.php
--- a/src/applications/nuance/controller/NuanceQueueEditController.php
+++ b/src/applications/nuance/controller/NuanceQueueEditController.php
@@ -1,6 +1,7 @@
<?php
-final class NuanceQueueEditController extends NuanceController {
+final class NuanceQueueEditController
+ extends NuanceQueueController {
public function handleRequest(AphrontRequest $request) {
$viewer = $this->getViewer();
diff --git a/src/applications/nuance/controller/NuanceQueueListController.php b/src/applications/nuance/controller/NuanceQueueListController.php
--- a/src/applications/nuance/controller/NuanceQueueListController.php
+++ b/src/applications/nuance/controller/NuanceQueueListController.php
@@ -1,31 +1,12 @@
<?php
final class NuanceQueueListController
- extends NuanceController {
+ extends NuanceQueueController {
public function handleRequest(AphrontRequest $request) {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
- ->setQueryKey($request->getURIData('queryKey'))
- ->setSearchEngine(new NuanceQueueSearchEngine())
- ->setNavigation($this->buildSideNavView());
-
- return $this->delegateToController($controller);
- }
-
- public function buildSideNavView($for_app = false) {
- $user = $this->getRequest()->getUser();
-
- $nav = new AphrontSideNavFilterView();
- $nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
-
- id(new NuanceQueueSearchEngine())
- ->setViewer($user)
- ->addNavigationItems($nav->getMenu());
-
- $nav->selectFilter(null);
-
- return $nav;
+ return id(new NuanceQueueSearchEngine())
+ ->setController($this)
+ ->buildResponse();
}
protected function buildApplicationCrumbs() {
diff --git a/src/applications/nuance/controller/NuanceQueueViewController.php b/src/applications/nuance/controller/NuanceQueueViewController.php
--- a/src/applications/nuance/controller/NuanceQueueViewController.php
+++ b/src/applications/nuance/controller/NuanceQueueViewController.php
@@ -1,6 +1,7 @@
<?php
-final class NuanceQueueViewController extends NuanceController {
+final class NuanceQueueViewController
+ extends NuanceQueueController {
public function handleRequest(AphrontRequest $request) {
$viewer = $this->getViewer();
diff --git a/src/applications/nuance/controller/NuanceSourceController.php b/src/applications/nuance/controller/NuanceSourceController.php
new file mode 100644
--- /dev/null
+++ b/src/applications/nuance/controller/NuanceSourceController.php
@@ -0,0 +1,11 @@
+<?php
+
+abstract class NuanceSourceController
+ extends NuanceController {
+
+ public function buildApplicationMenu() {
+ return $this->newApplicationMenu()
+ ->setSearchEngine(new NuanceSourceSearchEngine());
+ }
+
+}
diff --git a/src/applications/nuance/controller/NuanceSourceCreateController.php b/src/applications/nuance/controller/NuanceSourceCreateController.php
--- a/src/applications/nuance/controller/NuanceSourceCreateController.php
+++ b/src/applications/nuance/controller/NuanceSourceCreateController.php
@@ -1,6 +1,7 @@
<?php
-final class NuanceSourceCreateController extends NuanceController {
+final class NuanceSourceCreateController
+ extends NuanceSourceController {
public function handleRequest(AphrontRequest $request) {
$can_edit = $this->requireApplicationCapability(
diff --git a/src/applications/nuance/controller/NuanceSourceEditController.php b/src/applications/nuance/controller/NuanceSourceEditController.php
--- a/src/applications/nuance/controller/NuanceSourceEditController.php
+++ b/src/applications/nuance/controller/NuanceSourceEditController.php
@@ -1,6 +1,7 @@
<?php
-final class NuanceSourceEditController extends NuanceController {
+final class NuanceSourceEditController
+ extends NuanceSourceController {
public function handleRequest(AphrontRequest $request) {
$can_edit = $this->requireApplicationCapability(
diff --git a/src/applications/nuance/controller/NuanceSourceListController.php b/src/applications/nuance/controller/NuanceSourceListController.php
--- a/src/applications/nuance/controller/NuanceSourceListController.php
+++ b/src/applications/nuance/controller/NuanceSourceListController.php
@@ -1,31 +1,12 @@
<?php
final class NuanceSourceListController
- extends NuanceController {
+ extends NuanceSourceController {
public function handleRequest(AphrontRequest $request) {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
- ->setQueryKey($request->getURIData('queryKey'))
- ->setSearchEngine(new NuanceSourceSearchEngine())
- ->setNavigation($this->buildSideNavView());
-
- return $this->delegateToController($controller);
- }
-
- public function buildSideNavView($for_app = false) {
- $user = $this->getRequest()->getUser();
-
- $nav = new AphrontSideNavFilterView();
- $nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
-
- id(new NuanceSourceSearchEngine())
- ->setViewer($user)
- ->addNavigationItems($nav->getMenu());
-
- $nav->selectFilter(null);
-
- return $nav;
+ return id(new NuanceSourceSearchEngine())
+ ->setController($this)
+ ->buildResponse();
}
protected function buildApplicationCrumbs() {
diff --git a/src/applications/nuance/controller/NuanceSourceViewController.php b/src/applications/nuance/controller/NuanceSourceViewController.php
--- a/src/applications/nuance/controller/NuanceSourceViewController.php
+++ b/src/applications/nuance/controller/NuanceSourceViewController.php
@@ -1,6 +1,7 @@
<?php
-final class NuanceSourceViewController extends NuanceController {
+final class NuanceSourceViewController
+ extends NuanceSourceController {
public function handleRequest(AphrontRequest $request) {
$viewer = $this->getViewer();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 29, 1:50 AM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7390663
Default Alt Text
D15428.id37191.diff (10 KB)
Attached To
Mode
D15428: Use modern SearchEngine construction in Nuance
Attached
Detach File
Event Timeline
Log In to Comment