mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-10 23:01:04 +01:00
Add Conduit edit endpoint for Macro
Summary: Opens up the edit endpoint for Macros Test Plan: Review /conduit/method/macro.edit/ Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D17866
This commit is contained in:
parent
d39758ca7c
commit
bc4edc946b
3 changed files with 22 additions and 1 deletions
|
@ -1451,6 +1451,7 @@ phutil_register_library_map(array(
|
||||||
'LiskRawMigrationIterator' => 'infrastructure/storage/lisk/LiskRawMigrationIterator.php',
|
'LiskRawMigrationIterator' => 'infrastructure/storage/lisk/LiskRawMigrationIterator.php',
|
||||||
'MacroConduitAPIMethod' => 'applications/macro/conduit/MacroConduitAPIMethod.php',
|
'MacroConduitAPIMethod' => 'applications/macro/conduit/MacroConduitAPIMethod.php',
|
||||||
'MacroCreateMemeConduitAPIMethod' => 'applications/macro/conduit/MacroCreateMemeConduitAPIMethod.php',
|
'MacroCreateMemeConduitAPIMethod' => 'applications/macro/conduit/MacroCreateMemeConduitAPIMethod.php',
|
||||||
|
'MacroEditConduitAPIMethod' => 'applications/macro/conduit/MacroEditConduitAPIMethod.php',
|
||||||
'MacroEmojiExample' => 'applications/uiexample/examples/MacroEmojiExample.php',
|
'MacroEmojiExample' => 'applications/uiexample/examples/MacroEmojiExample.php',
|
||||||
'MacroQueryConduitAPIMethod' => 'applications/macro/conduit/MacroQueryConduitAPIMethod.php',
|
'MacroQueryConduitAPIMethod' => 'applications/macro/conduit/MacroQueryConduitAPIMethod.php',
|
||||||
'ManiphestAssignEmailCommand' => 'applications/maniphest/command/ManiphestAssignEmailCommand.php',
|
'ManiphestAssignEmailCommand' => 'applications/maniphest/command/ManiphestAssignEmailCommand.php',
|
||||||
|
@ -6479,6 +6480,7 @@ phutil_register_library_map(array(
|
||||||
'LiskRawMigrationIterator' => 'PhutilBufferedIterator',
|
'LiskRawMigrationIterator' => 'PhutilBufferedIterator',
|
||||||
'MacroConduitAPIMethod' => 'ConduitAPIMethod',
|
'MacroConduitAPIMethod' => 'ConduitAPIMethod',
|
||||||
'MacroCreateMemeConduitAPIMethod' => 'MacroConduitAPIMethod',
|
'MacroCreateMemeConduitAPIMethod' => 'MacroConduitAPIMethod',
|
||||||
|
'MacroEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
|
||||||
'MacroEmojiExample' => 'PhabricatorUIExample',
|
'MacroEmojiExample' => 'PhabricatorUIExample',
|
||||||
'MacroQueryConduitAPIMethod' => 'MacroConduitAPIMethod',
|
'MacroQueryConduitAPIMethod' => 'MacroConduitAPIMethod',
|
||||||
'ManiphestAssignEmailCommand' => 'ManiphestEmailCommand',
|
'ManiphestAssignEmailCommand' => 'ManiphestEmailCommand',
|
||||||
|
|
19
src/applications/macro/conduit/MacroEditConduitAPIMethod.php
Normal file
19
src/applications/macro/conduit/MacroEditConduitAPIMethod.php
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class MacroEditConduitAPIMethod
|
||||||
|
extends PhabricatorEditEngineAPIMethod {
|
||||||
|
|
||||||
|
public function getAPIMethodName() {
|
||||||
|
return 'macro.edit';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function newEditEngine() {
|
||||||
|
return new PhabricatorMacroEditEngine();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMethodSummary() {
|
||||||
|
return pht(
|
||||||
|
'Apply transactions to create a new macro or edit an existing one.');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -87,7 +87,7 @@ final class PhabricatorMacroEditEngine
|
||||||
->setKey('name')
|
->setKey('name')
|
||||||
->setLabel(pht('Name'))
|
->setLabel(pht('Name'))
|
||||||
->setDescription(pht('Macro name.'))
|
->setDescription(pht('Macro name.'))
|
||||||
->setConduitDescription(pht('Rename the macro.'))
|
->setConduitDescription(pht('Name of the macro.'))
|
||||||
->setConduitTypeDescription(pht('New macro name.'))
|
->setConduitTypeDescription(pht('New macro name.'))
|
||||||
->setTransactionType(PhabricatorMacroNameTransaction::TRANSACTIONTYPE)
|
->setTransactionType(PhabricatorMacroNameTransaction::TRANSACTIONTYPE)
|
||||||
->setIsRequired(true)
|
->setIsRequired(true)
|
||||||
|
|
Loading…
Reference in a new issue