Changeset View
Changeset View
Standalone View
Standalone View
src/applications/paste/editor/PhabricatorPasteEditEngine.php
Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | return array( | ||||
'Programming language to interpret the paste as for syntax '. | 'Programming language to interpret the paste as for syntax '. | ||||
'highlighting. By default, the language is inferred from the '. | 'highlighting. By default, the language is inferred from the '. | ||||
'title.')) | 'title.')) | ||||
->setAliases(array('lang')) | ->setAliases(array('lang')) | ||||
->setTransactionType(PhabricatorPasteTransaction::TYPE_LANGUAGE) | ->setTransactionType(PhabricatorPasteTransaction::TYPE_LANGUAGE) | ||||
->setIsCopyable(true) | ->setIsCopyable(true) | ||||
->setValue($object->getLanguage()) | ->setValue($object->getLanguage()) | ||||
->setOptions($langs), | ->setOptions($langs), | ||||
id(new PhabricatorSelectEditField()) | |||||
->setKey('status') | |||||
->setLabel(pht('Status')) | |||||
->setDescription(pht('Archive the paste.')) | |||||
->setTransactionType(PhabricatorPasteTransaction::TYPE_STATUS) | |||||
->setValue($object->getStatus()) | |||||
->setOptions(PhabricatorPaste::getStatusNameMap()), | |||||
id(new PhabricatorTextAreaEditField()) | id(new PhabricatorTextAreaEditField()) | ||||
->setKey('text') | ->setKey('text') | ||||
->setLabel(pht('Text')) | ->setLabel(pht('Text')) | ||||
->setDescription(pht('The main body text of the paste.')) | ->setDescription(pht('The main body text of the paste.')) | ||||
->setTransactionType(PhabricatorPasteTransaction::TYPE_CONTENT) | ->setTransactionType(PhabricatorPasteTransaction::TYPE_CONTENT) | ||||
->setMonospaced(true) | ->setMonospaced(true) | ||||
->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_TALL) | ->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_TALL) | ||||
->setValue($object->getRawContent()), | ->setValue($object->getRawContent()), | ||||
); | ); | ||||
} | } | ||||
} | } |