Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13968686
D17065.id41069.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D17065.id41069.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
@@ -2572,6 +2572,7 @@
'PhabricatorEditEngineConfigurationViewController' => 'applications/transactions/controller/PhabricatorEditEngineConfigurationViewController.php',
'PhabricatorEditEngineController' => 'applications/transactions/controller/PhabricatorEditEngineController.php',
'PhabricatorEditEngineCreateQuickActions' => 'applications/settings/quickmenu/PhabricatorEditEngineCreateQuickActions.php',
+ 'PhabricatorEditEngineDatasource' => 'applications/transactions/typeahead/PhabricatorEditEngineDatasource.php',
'PhabricatorEditEngineExtension' => 'applications/transactions/engineextension/PhabricatorEditEngineExtension.php',
'PhabricatorEditEngineExtensionModule' => 'applications/transactions/engineextension/PhabricatorEditEngineExtensionModule.php',
'PhabricatorEditEngineListController' => 'applications/transactions/controller/PhabricatorEditEngineListController.php',
@@ -7551,6 +7552,7 @@
'PhabricatorEditEngineConfigurationViewController' => 'PhabricatorEditEngineController',
'PhabricatorEditEngineController' => 'PhabricatorApplicationTransactionController',
'PhabricatorEditEngineCreateQuickActions' => 'PhabricatorQuickActions',
+ 'PhabricatorEditEngineDatasource' => 'PhabricatorTypeaheadDatasource',
'PhabricatorEditEngineExtension' => 'Phobject',
'PhabricatorEditEngineExtensionModule' => 'PhabricatorConfigModule',
'PhabricatorEditEngineListController' => 'PhabricatorEditEngineController',
diff --git a/src/applications/transactions/typeahead/PhabricatorEditEngineDatasource.php b/src/applications/transactions/typeahead/PhabricatorEditEngineDatasource.php
new file mode 100644
--- /dev/null
+++ b/src/applications/transactions/typeahead/PhabricatorEditEngineDatasource.php
@@ -0,0 +1,39 @@
+<?php
+
+final class PhabricatorEditEngineDatasource
+ extends PhabricatorTypeaheadDatasource {
+
+ public function getBrowseTitle() {
+ return pht('Browse Forms');
+ }
+
+ public function getPlaceholderText() {
+ return pht('Type a form name...');
+ }
+
+ public function getDatasourceApplicationClass() {
+ return 'PhabricatorTransactionsApplication';
+ }
+
+ public function loadResults() {
+ $query = id(new PhabricatorEditEngineConfigurationQuery());
+
+ $forms = $this->executeQuery($query);
+ $results = array();
+ foreach ($forms as $form) {
+
+ $result = id(new PhabricatorTypeaheadResult())
+ ->setName($form->getName())
+ ->setPHID($form->getPHID());
+
+ if ($form->getIsDisabled()) {
+ $result->setClosed(pht('Archived'));
+ }
+
+ $results[] = $result;
+ }
+
+ return $this->filterResultsAgainstTokens($results);
+ }
+
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 17 2024, 10:43 PM (4 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6713389
Default Alt Text
D17065.id41069.diff (2 KB)
Attached To
Mode
D17065: Add EditEngine typeahead
Attached
Detach File
Event Timeline
Log In to Comment