Differential D14600 Diff 35337 src/applications/transactions/editengine/PhabricatorEditEngineAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/editengine/PhabricatorEditEngineAPIMethod.php
| Show All 16 Lines | abstract class PhabricatorEditEngineAPIMethod | ||||
| public function getMethodStatusDescription() { | public function getMethodStatusDescription() { | ||||
| return pht('ApplicationEditor methods are highly unstable.'); | return pht('ApplicationEditor methods are highly unstable.'); | ||||
| } | } | ||||
| final protected function defineParamTypes() { | final protected function defineParamTypes() { | ||||
| return array( | return array( | ||||
| 'transactions' => 'list<map<string, wild>>', | 'transactions' => 'list<map<string, wild>>', | ||||
| 'objectPHID' => 'optional phid', | 'objectIdentifier' => 'optional id|phid|string', | ||||
| ); | ); | ||||
| } | } | ||||
| final protected function defineReturnType() { | final protected function defineReturnType() { | ||||
| return 'map<string, wild>'; | return 'map<string, wild>'; | ||||
| } | } | ||||
| final protected function execute(ConduitAPIRequest $request) { | final protected function execute(ConduitAPIRequest $request) { | ||||
| ▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | |||||
| ``` | ``` | ||||
| Exactly which types of edits are available depends on the object you're editing. | Exactly which types of edits are available depends on the object you're editing. | ||||
| Creating Objects | Creating Objects | ||||
| ---------------- | ---------------- | ||||
| To create an object, pass a list of `transactions` but leave `objectPHID` | To create an object, pass a list of `transactions` but leave `objectIdentifier` | ||||
| empty. This will create a new object with the initial field values you | empty. This will create a new object with the initial field values you | ||||
| specify. | specify. | ||||
| Editing Objects | Editing Objects | ||||
| --------------- | --------------- | ||||
| To edit an object, pass a list of `transactions` and specify an object to | To edit an object, pass a list of `transactions` and specify an object to | ||||
| apply them to with `objectPHID`. This will apply the changes to the object. | apply them to with `objectIdentifier`. This will apply the changes to the | ||||
| object. | |||||
| You may pass an ID (like `123`), PHID (like `PHID-WXYZ-abcdef...`), or | |||||
| monogram (like `T123`, for objects which have monograms). | |||||
| Return Type | Return Type | ||||
| ----------- | ----------- | ||||
| WARNING: The structure of the return value from these methods is likely to | WARNING: The structure of the return value from these methods is likely to | ||||
| change as ApplicationEditor evolves. | change as ApplicationEditor evolves. | ||||
| ▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines | |||||