Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15284168
D17679.id42519.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D17679.id42519.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
@@ -338,6 +338,8 @@
'ConpherenceUpdateController' => 'applications/conpherence/controller/ConpherenceUpdateController.php',
'ConpherenceUpdateThreadConduitAPIMethod' => 'applications/conpherence/conduit/ConpherenceUpdateThreadConduitAPIMethod.php',
'ConpherenceViewController' => 'applications/conpherence/controller/ConpherenceViewController.php',
+ 'CountdownEditConduitAPIMethod' => 'applications/countdown/conduit/CountdownEditConduitAPIMethod.php',
+ 'CountdownSearchConduitAPIMethod' => 'applications/countdown/conduit/CountdownSearchConduitAPIMethod.php',
'DarkConsoleController' => 'applications/console/controller/DarkConsoleController.php',
'DarkConsoleCore' => 'applications/console/core/DarkConsoleCore.php',
'DarkConsoleDataController' => 'applications/console/controller/DarkConsoleDataController.php',
@@ -5127,6 +5129,8 @@
'ConpherenceUpdateController' => 'ConpherenceController',
'ConpherenceUpdateThreadConduitAPIMethod' => 'ConpherenceConduitAPIMethod',
'ConpherenceViewController' => 'ConpherenceController',
+ 'CountdownEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
+ 'CountdownSearchConduitAPIMethod' => 'PhabricatorSearchEngineAPIMethod',
'DarkConsoleController' => 'PhabricatorController',
'DarkConsoleCore' => 'Phobject',
'DarkConsoleDataController' => 'PhabricatorController',
@@ -7513,6 +7517,7 @@
'PhabricatorSpacesInterface',
'PhabricatorProjectInterface',
'PhabricatorDestructibleInterface',
+ 'PhabricatorConduitResultInterface',
),
'PhabricatorCountdownApplication' => 'PhabricatorApplication',
'PhabricatorCountdownController' => 'PhabricatorController',
diff --git a/src/applications/countdown/conduit/CountdownEditConduitAPIMethod.php b/src/applications/countdown/conduit/CountdownEditConduitAPIMethod.php
new file mode 100644
--- /dev/null
+++ b/src/applications/countdown/conduit/CountdownEditConduitAPIMethod.php
@@ -0,0 +1,18 @@
+<?php
+
+final class CountdownEditConduitAPIMethod
+ extends PhabricatorEditEngineAPIMethod {
+
+ public function getAPIMethodName() {
+ return 'countdown.edit';
+ }
+
+ public function newEditEngine() {
+ return new PhabricatorCountdownEditEngine();
+ }
+
+ public function getMethodSummary() {
+ return pht(
+ 'Apply transactions to create a new countdown or edit an existing one.');
+ }
+}
diff --git a/src/applications/countdown/conduit/CountdownSearchConduitAPIMethod.php b/src/applications/countdown/conduit/CountdownSearchConduitAPIMethod.php
new file mode 100644
--- /dev/null
+++ b/src/applications/countdown/conduit/CountdownSearchConduitAPIMethod.php
@@ -0,0 +1,18 @@
+<?php
+
+final class CountdownSearchConduitAPIMethod
+ extends PhabricatorSearchEngineAPIMethod {
+
+ public function getAPIMethodName() {
+ return 'countdown.search';
+ }
+
+ public function newSearchEngine() {
+ return new PhabricatorCountdownSearchEngine();
+ }
+
+ public function getMethodSummary() {
+ return pht('Read information about countdowns.');
+ }
+
+}
diff --git a/src/applications/countdown/storage/PhabricatorCountdown.php b/src/applications/countdown/storage/PhabricatorCountdown.php
--- a/src/applications/countdown/storage/PhabricatorCountdown.php
+++ b/src/applications/countdown/storage/PhabricatorCountdown.php
@@ -9,7 +9,8 @@
PhabricatorTokenReceiverInterface,
PhabricatorSpacesInterface,
PhabricatorProjectInterface,
- PhabricatorDestructibleInterface {
+ PhabricatorDestructibleInterface,
+ PhabricatorConduitResultInterface {
protected $title;
protected $authorPHID;
@@ -151,10 +152,39 @@
public function destroyObjectPermanently(
- PhabricatorDestructionEngine $engine) {
+ PhabricatorDestructionEngine $engine) {
$this->openTransaction();
$this->delete();
$this->saveTransaction();
}
+
+/* -( PhabricatorConduitResultInterface )---------------------------------- */
+
+
+ public function getFieldSpecificationsForConduit() {
+ return array(
+ id(new PhabricatorConduitSearchFieldSpecification())
+ ->setKey('title')
+ ->setType('string')
+ ->setDescription(pht('The title of the countdown.')),
+ id(new PhabricatorConduitSearchFieldSpecification())
+ ->setKey('description')
+ ->setType('string')
+ ->setDescription(pht('The description of the countdown.')),
+ );
+ }
+
+ public function getFieldValuesForConduit() {
+ return array(
+ 'title' => $this->getTitle(),
+ 'description' => $this->getDescription(),
+ 'epoch' => $this->getEpoch(),
+ );
+ }
+
+ public function getConduitSearchAttachments() {
+ return array();
+ }
+
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mar 5 2025, 9:21 AM (4 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7224568
Default Alt Text
D17679.id42519.diff (4 KB)
Attached To
Mode
D17679: Implement countdown.search and countdown.edit
Attached
Detach File
Event Timeline
Log In to Comment