Changeset View
Changeset View
Standalone View
Standalone View
src/applications/paste/editor/PhabricatorPasteEditEngine.php
| <?php | <?php | ||||
| final class PhabricatorPasteEditEngine | final class PhabricatorPasteEditEngine | ||||
| extends PhabricatorApplicationEditEngine { | extends PhabricatorEditEngine { | ||||
| const ENGINECONST = 'paste.paste'; | |||||
| public function getEngineName() { | |||||
| return pht('Pastes'); | |||||
| } | |||||
| protected function newEditableObject() { | protected function newEditableObject() { | ||||
| return PhabricatorPaste::initializeNewPaste($this->getViewer()); | return PhabricatorPaste::initializeNewPaste($this->getViewer()); | ||||
| } | } | ||||
| protected function newObjectQuery() { | protected function newObjectQuery() { | ||||
| return id(new PhabricatorPasteQuery()) | return id(new PhabricatorPasteQuery()) | ||||
| ->needRawContent(true); | ->needRawContent(true); | ||||
| } | } | ||||
| protected function getObjectCreateTitleText($object) { | protected function getObjectCreateTitleText($object) { | ||||
| return pht('Create New Paste'); | return pht('Create New Paste'); | ||||
| } | } | ||||
| protected function getObjectEditTitleText($object) { | protected function getObjectEditTitleText($object) { | ||||
| return pht('Edit %s %s', $object->getMonogram(), $object->getTitle()); | return pht('Edit %s %s', $object->getMonogram(), $object->getTitle()); | ||||
| } | } | ||||
| protected function getObjectEditShortText($object) { | protected function getObjectEditShortText($object) { | ||||
| return $object->getMonogram(); | return $object->getMonogram(); | ||||
| } | } | ||||
| protected function getObjectCreateShortText($object) { | protected function getObjectCreateShortText() { | ||||
| return pht('Create Paste'); | return pht('Create Paste'); | ||||
| } | } | ||||
| protected function getObjectViewURI($object) { | protected function getObjectViewURI($object) { | ||||
| return '/P'.$object->getID(); | return '/P'.$object->getID(); | ||||
| } | } | ||||
| protected function buildCustomEditFields($object) { | protected function buildCustomEditFields($object) { | ||||
| ▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines | |||||