mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 08:12:40 +01:00
d6b882a804
Summary: Ref T6822. Test Plan: `grep` Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: hach-que, Korvin, epriestley Maniphest Tasks: T6822 Differential Revision: https://secure.phabricator.com/D11370
41 lines
1.1 KiB
PHP
41 lines
1.1 KiB
PHP
<?php
|
|
|
|
final class LegalpadTransactionComment
|
|
extends PhabricatorApplicationTransactionComment {
|
|
|
|
protected $documentID;
|
|
protected $lineNumber;
|
|
protected $lineLength;
|
|
protected $fixedState;
|
|
protected $hasReplies = 0;
|
|
protected $replyToCommentPHID;
|
|
|
|
public function getApplicationTransactionObject() {
|
|
return new LegalpadTransaction();
|
|
}
|
|
|
|
public function shouldUseMarkupCache($field) {
|
|
// Only cache submitted comments.
|
|
return ($this->getTransactionPHID() != null);
|
|
}
|
|
|
|
protected function getConfiguration() {
|
|
$config = parent::getConfiguration();
|
|
$config[self::CONFIG_COLUMN_SCHEMA] = array(
|
|
'documentID' => 'id?',
|
|
'lineNumber' => 'uint32',
|
|
'lineLength' => 'uint32',
|
|
'fixedState' => 'text12?',
|
|
'hasReplies' => 'bool',
|
|
'replyToCommentPHID' => 'phid?',
|
|
) + $config[self::CONFIG_COLUMN_SCHEMA];
|
|
$config[self::CONFIG_KEY_SCHEMA] = array(
|
|
'key_draft' => array(
|
|
'columns' => array('authorPHID', 'documentID', 'transactionPHID'),
|
|
'unique' => true,
|
|
),
|
|
) + $config[self::CONFIG_KEY_SCHEMA];
|
|
return $config;
|
|
}
|
|
|
|
}
|