Differential D17067 Diff 41083 src/applications/transactions/engineextension/PhabricatorCommentEditEngineExtension.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/engineextension/PhabricatorCommentEditEngineExtension.php
| <?php | <?php | ||||
| final class PhabricatorCommentEditEngineExtension | final class PhabricatorCommentEditEngineExtension | ||||
| extends PhabricatorEditEngineExtension { | extends PhabricatorEditEngineExtension { | ||||
| const EXTENSIONKEY = 'transactions.comment'; | const EXTENSIONKEY = 'transactions.comment'; | ||||
| const EDITKEY = 'comment'; | |||||
| public function getExtensionPriority() { | public function getExtensionPriority() { | ||||
| return 9000; | return 9000; | ||||
| } | } | ||||
| public function isExtensionEnabled() { | public function isExtensionEnabled() { | ||||
| return true; | return true; | ||||
| } | } | ||||
| Show All 19 Lines | final class PhabricatorCommentEditEngineExtension | ||||
| public function buildCustomEditFields( | public function buildCustomEditFields( | ||||
| PhabricatorEditEngine $engine, | PhabricatorEditEngine $engine, | ||||
| PhabricatorApplicationTransactionInterface $object) { | PhabricatorApplicationTransactionInterface $object) { | ||||
| $comment_type = PhabricatorTransactions::TYPE_COMMENT; | $comment_type = PhabricatorTransactions::TYPE_COMMENT; | ||||
| $comment_field = id(new PhabricatorCommentEditField()) | $comment_field = id(new PhabricatorCommentEditField()) | ||||
| ->setKey('comment') | ->setKey(self::EDITKEY) | ||||
| ->setLabel(pht('Comments')) | ->setLabel(pht('Comments')) | ||||
| ->setAliases(array('comments')) | ->setAliases(array('comments')) | ||||
| ->setIsHidden(true) | ->setIsHidden(true) | ||||
| ->setIsReorderable(false) | ->setIsReorderable(false) | ||||
| ->setIsDefaultable(false) | ->setIsDefaultable(false) | ||||
| ->setIsLockable(false) | ->setIsLockable(false) | ||||
| ->setTransactionType($comment_type) | ->setTransactionType($comment_type) | ||||
| ->setConduitDescription(pht('Make comments.')) | ->setConduitDescription(pht('Make comments.')) | ||||
| Show All 10 Lines | |||||