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 @@ +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('remarkup') + ->setDescription(pht('The description of the countdown.')), + id(new PhabricatorConduitSearchFieldSpecification()) + ->setKey('epoch') + ->setType('epoch') + ->setDescription(pht('The end date of the countdown.')), + ); + } + + public function getFieldValuesForConduit() { + return array( + 'title' => $this->getTitle(), + 'description' => array( + 'raw' => $this->getDescription(), + ), + 'epoch' => (int)$this->getEpoch(), + ); + } + + public function getConduitSearchAttachments() { + return array(); + } + }