Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/editor/DiffusionCommitEditEngine.php
Show All 20 Lines | public function getSummaryText() { | ||||
return pht('Edit commits.'); | return pht('Edit commits.'); | ||||
} | } | ||||
public function getEngineApplicationClass() { | public function getEngineApplicationClass() { | ||||
return 'PhabricatorDiffusionApplication'; | return 'PhabricatorDiffusionApplication'; | ||||
} | } | ||||
protected function newEditableObject() { | protected function newEditableObject() { | ||||
throw new PhutilMethodNotImplementedException(); | // NOTE: We must return a valid object here so that things like Conduit | ||||
// documentation generation work. You can't actually create commits via | |||||
// EditEngine. This is enforced with a "No One" creation policy. | |||||
$repository = new PhabricatorRepository(); | |||||
$data = new PhabricatorRepositoryCommitData(); | |||||
return id(new PhabricatorRepositoryCommit()) | |||||
->attachRepository($repository) | |||||
->attachCommitData($data); | |||||
} | } | ||||
protected function newObjectQuery() { | protected function newObjectQuery() { | ||||
return id(new DiffusionCommitQuery()) | return id(new DiffusionCommitQuery()) | ||||
->needCommitData(true); | ->needCommitData(true); | ||||
} | } | ||||
protected function getObjectCreateTitleText($object) { | protected function getObjectCreateTitleText($object) { | ||||
▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines |